History

btrfs: Make btrfs_ino take a struct btrfs_inode

Currently btrfs_ino takes a struct inode and this causes a lot of internal btrfs functions which consume this ino to take a VFS inode, rather than btrfs' own struct btrfs_inode. In order to fix this "leak" of VFS structs into the internals of btrfs first it's necessary to eliminate all uses of struct inode for the purpose of inode. This patch does that by using BTRFS_I to convert an inode to btrfs_inode. With this problem eliminated subsequent patches will start eliminating the passing of struct inode altogether, eventually resulting in a lot cleaner code.

Nikolay Borisov committed 9 years ago

Commit 4a0cc7c1 parent 823bb2018 files · +151 −151Browse files

Unified · Split

18 files
  1. fs/btrfs/btrfs_inode.h +5 −5
  2. fs/btrfs/compression.c +1 −1
  3. fs/btrfs/delayed-inode.c +7 −7
  4. fs/btrfs/dir-item.c +1 −1
  5. fs/btrfs/export.c +5 −5
  6. fs/btrfs/extent-tree.c +5 −5
  7. fs/btrfs/extent_io.c +5 −5
  8. fs/btrfs/file-item.c +2 −2
  9. fs/btrfs/file.c +6 −6
  10. fs/btrfs/free-space-cache.c +1 −1
  11. fs/btrfs/inode.c +61 −61
  12. fs/btrfs/ioctl.c +13 −13
  13. fs/btrfs/props.c +2 −2
  14. fs/btrfs/relocation.c +8 −8
  15. fs/btrfs/transaction.c +2 −2
  16. fs/btrfs/tree-log.c +21 −21
  17. fs/btrfs/xattr.c +5 −5
  18. include/trace/events/btrfs.h +1 −1
fs/btrfs/btrfs_inode.h+5−5
@@ -224,16 +224,16 @@ static inline void btrfs_insert_inode_hash(struct inode *inode) · 223 unmodified lines
224 __insert_inode_hash(inode, h);224 __insert_inode_hash(inode, h);
225}225}
226 226
227static inline u64 btrfs_ino(struct inode *inode)227static inline u64 btrfs_ino(struct btrfs_inode *inode)
228{228{
229 u64 ino = BTRFS_I(inode)->location.objectid;229 u64 ino = inode->location.objectid;
230 230
231 /*231 /*
232 * !ino: btree_inode232 * !ino: btree_inode
233 * type == BTRFS_ROOT_ITEM_KEY: subvol dir233 * type == BTRFS_ROOT_ITEM_KEY: subvol dir
234 */234 */
235 if (!ino || BTRFS_I(inode)->location.type == BTRFS_ROOT_ITEM_KEY)235 if (!ino || inode->location.type == BTRFS_ROOT_ITEM_KEY)
236 ino = inode->i_ino;236 ino = inode->vfs_inode.i_ino;
237 return ino;237 return ino;
238}238}
239 239
@@ -248,7 +248,7 @@ static inline bool btrfs_is_free_space_inode(struct inode *inode) · 8 unmodified lines
248 struct btrfs_root *root = BTRFS_I(inode)->root;248 struct btrfs_root *root = BTRFS_I(inode)->root;
249 249
250 if (root == root->fs_info->tree_root &&250 if (root == root->fs_info->tree_root &&
251 btrfs_ino(inode) != BTRFS_BTREE_INODE_OBJECTID)251 btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID)
252 return true;252 return true;
253 if (BTRFS_I(inode)->location.objectid == BTRFS_FREE_INO_OBJECTID)253 if (BTRFS_I(inode)->location.objectid == BTRFS_FREE_INO_OBJECTID)
254 return true;254 return true;
fs/btrfs/compression.c+1−1
@@ -126,7 +126,7 @@ static int check_compressed_csum(struct inode *inode, · 125 unmodified lines
126 if (csum != *cb_sum) {126 if (csum != *cb_sum) {
127 btrfs_info(BTRFS_I(inode)->root->fs_info,127 btrfs_info(BTRFS_I(inode)->root->fs_info,
128 "csum failed ino %llu extent %llu csum %u wanted %u mirror %d",128 "csum failed ino %llu extent %llu csum %u wanted %u mirror %d",
129 btrfs_ino(inode), disk_start, csum, *cb_sum,129 btrfs_ino(BTRFS_I(inode)), disk_start, csum, *cb_sum,
130 cb->mirror_num);130 cb->mirror_num);
131 ret = -EIO;131 ret = -EIO;
132 goto fail;132 goto fail;
fs/btrfs/delayed-inode.c+7−7
@@ -76,7 +76,7 @@ static struct btrfs_delayed_node *btrfs_get_delayed_node(struct inode *inode) · 75 unmodified lines
76{76{
77 struct btrfs_inode *btrfs_inode = BTRFS_I(inode);77 struct btrfs_inode *btrfs_inode = BTRFS_I(inode);
78 struct btrfs_root *root = btrfs_inode->root;78 struct btrfs_root *root = btrfs_inode->root;
79 u64 ino = btrfs_ino(inode);79 u64 ino = btrfs_ino(btrfs_inode);
80 struct btrfs_delayed_node *node;80 struct btrfs_delayed_node *node;
81 81
82 node = READ_ONCE(btrfs_inode->delayed_node);82 node = READ_ONCE(btrfs_inode->delayed_node);
@@ -112,7 +112,7 @@ static struct btrfs_delayed_node *btrfs_get_or_create_delayed_node( · 29 unmodified lines
112 struct btrfs_delayed_node *node;112 struct btrfs_delayed_node *node;
113 struct btrfs_inode *btrfs_inode = BTRFS_I(inode);113 struct btrfs_inode *btrfs_inode = BTRFS_I(inode);
114 struct btrfs_root *root = btrfs_inode->root;114 struct btrfs_root *root = btrfs_inode->root;
115 u64 ino = btrfs_ino(inode);115 u64 ino = btrfs_ino(btrfs_inode);
116 int ret;116 int ret;
117 117
118again:118again:
@@ -637,7 +637,7 @@ static int btrfs_delayed_inode_reserve_metadata( · 518 unmodified lines
637 node->bytes_reserved = num_bytes;637 node->bytes_reserved = num_bytes;
638 trace_btrfs_space_reservation(fs_info,638 trace_btrfs_space_reservation(fs_info,
639 "delayed_inode",639 "delayed_inode",
640 btrfs_ino(inode),640 btrfs_ino(BTRFS_I(inode)),
641 num_bytes, 1);641 num_bytes, 1);
642 }642 }
643 return ret;643 return ret;
@@ -660,13 +660,13 @@ static int btrfs_delayed_inode_reserve_metadata( · 16 unmodified lines
660 */660 */
661 if (!ret) {661 if (!ret) {
662 trace_btrfs_space_reservation(fs_info, "delayed_inode",662 trace_btrfs_space_reservation(fs_info, "delayed_inode",
663 btrfs_ino(inode), num_bytes, 1);663 btrfs_ino(BTRFS_I(inode)), num_bytes, 1);
664 node->bytes_reserved = num_bytes;664 node->bytes_reserved = num_bytes;
665 }665 }
666 666
667 if (release) {667 if (release) {
668 trace_btrfs_space_reservation(fs_info, "delalloc",668 trace_btrfs_space_reservation(fs_info, "delalloc",
669 btrfs_ino(inode), num_bytes, 0);669 btrfs_ino(BTRFS_I(inode)), num_bytes, 0);
670 btrfs_block_rsv_release(fs_info, src_rsv, num_bytes);670 btrfs_block_rsv_release(fs_info, src_rsv, num_bytes);
671 }671 }
672 672
@@ -1453,7 +1453,7 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, · 780 unmodified lines
1453 goto release_node;1453 goto release_node;
1454 }1454 }
1455 1455
1456 delayed_item->key.objectid = btrfs_ino(dir);1456 delayed_item->key.objectid = btrfs_ino(BTRFS_I(dir));
1457 delayed_item->key.type = BTRFS_DIR_INDEX_KEY;1457 delayed_item->key.type = BTRFS_DIR_INDEX_KEY;
1458 delayed_item->key.offset = index;1458 delayed_item->key.offset = index;
1459 1459
@@ -1521,7 +1521,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, · 61 unmodified lines
1521 if (IS_ERR(node))1521 if (IS_ERR(node))
1522 return PTR_ERR(node);1522 return PTR_ERR(node);
1523 1523
1524 item_key.objectid = btrfs_ino(dir);1524 item_key.objectid = btrfs_ino(BTRFS_I(dir));
1525 item_key.type = BTRFS_DIR_INDEX_KEY;1525 item_key.type = BTRFS_DIR_INDEX_KEY;
1526 item_key.offset = index;1526 item_key.offset = index;
1527 1527
fs/btrfs/dir-item.c+1−1
@@ -133,7 +133,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root · 132 unmodified lines
133 struct btrfs_disk_key disk_key;133 struct btrfs_disk_key disk_key;
134 u32 data_size;134 u32 data_size;
135 135
136 key.objectid = btrfs_ino(dir);136 key.objectid = btrfs_ino(BTRFS_I(dir));
137 key.type = BTRFS_DIR_ITEM_KEY;137 key.type = BTRFS_DIR_ITEM_KEY;
138 key.offset = btrfs_name_hash(name, name_len);138 key.offset = btrfs_name_hash(name, name_len);
139 139
fs/btrfs/export.c+5−5
@@ -30,7 +30,7 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len, · 29 unmodified lines
30 len = BTRFS_FID_SIZE_NON_CONNECTABLE;30 len = BTRFS_FID_SIZE_NON_CONNECTABLE;
31 type = FILEID_BTRFS_WITHOUT_PARENT;31 type = FILEID_BTRFS_WITHOUT_PARENT;
32 32
33 fid->objectid = btrfs_ino(inode);33 fid->objectid = btrfs_ino(BTRFS_I(inode));
34 fid->root_objectid = BTRFS_I(inode)->root->objectid;34 fid->root_objectid = BTRFS_I(inode)->root->objectid;
35 fid->gen = inode->i_generation;35 fid->gen = inode->i_generation;
36 36
@@ -166,13 +166,13 @@ static struct dentry *btrfs_get_parent(struct dentry *child) · 129 unmodified lines
166 if (!path)166 if (!path)
167 return ERR_PTR(-ENOMEM);167 return ERR_PTR(-ENOMEM);
168 168
169 if (btrfs_ino(dir) == BTRFS_FIRST_FREE_OBJECTID) {169 if (btrfs_ino(BTRFS_I(dir)) == BTRFS_FIRST_FREE_OBJECTID) {
170 key.objectid = root->root_key.objectid;170 key.objectid = root->root_key.objectid;
171 key.type = BTRFS_ROOT_BACKREF_KEY;171 key.type = BTRFS_ROOT_BACKREF_KEY;
172 key.offset = (u64)-1;172 key.offset = (u64)-1;
173 root = fs_info->tree_root;173 root = fs_info->tree_root;
174 } else {174 } else {
175 key.objectid = btrfs_ino(dir);175 key.objectid = btrfs_ino(BTRFS_I(dir));
176 key.type = BTRFS_INODE_REF_KEY;176 key.type = BTRFS_INODE_REF_KEY;
177 key.offset = (u64)-1;177 key.offset = (u64)-1;
178 }178 }
@@ -238,7 +238,7 @@ static int btrfs_get_name(struct dentry *parent, char *name, · 59 unmodified lines
238 if (!S_ISDIR(dir->i_mode))238 if (!S_ISDIR(dir->i_mode))
239 return -EINVAL;239 return -EINVAL;
240 240
241 ino = btrfs_ino(inode);241 ino = btrfs_ino(BTRFS_I(inode));
242 242
243 path = btrfs_alloc_path();243 path = btrfs_alloc_path();
244 if (!path)244 if (!path)
@@ -252,7 +252,7 @@ static int btrfs_get_name(struct dentry *parent, char *name, · 7 unmodified lines
252 root = fs_info->tree_root;252 root = fs_info->tree_root;
253 } else {253 } else {
254 key.objectid = ino;254 key.objectid = ino;
255 key.offset = btrfs_ino(dir);255 key.offset = btrfs_ino(BTRFS_I(dir));
256 key.type = BTRFS_INODE_REF_KEY;256 key.type = BTRFS_INODE_REF_KEY;
257 }257 }
258 258
fs/btrfs/extent-tree.c+5−5
@@ -5756,7 +5756,7 @@ int btrfs_orphan_reserve_metadata(struct btrfs_trans_handle *trans, · 5755 unmodified lines
5756 u64 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);5756 u64 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);
5757 5757
5758 trace_btrfs_space_reservation(fs_info, "orphan",5758 trace_btrfs_space_reservation(fs_info, "orphan",
5759 btrfs_ino(inode), num_bytes, 1);5759 btrfs_ino(BTRFS_I(inode)), num_bytes, 1);
5760 return btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes, 1);5760 return btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes, 1);
5761}5761}
5762 5762
@@ -5767,7 +5767,7 @@ void btrfs_orphan_release_metadata(struct inode *inode) · 4 unmodified lines
5767 u64 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);5767 u64 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);
5768 5768
5769 trace_btrfs_space_reservation(fs_info, "orphan",5769 trace_btrfs_space_reservation(fs_info, "orphan",
5770 btrfs_ino(inode), num_bytes, 0);5770 btrfs_ino(BTRFS_I(inode)), num_bytes, 0);
5771 btrfs_block_rsv_release(fs_info, root->orphan_block_rsv, num_bytes);5771 btrfs_block_rsv_release(fs_info, root->orphan_block_rsv, num_bytes);
5772}5772}
5773 5773
@@ -6001,7 +6001,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes) · 227 unmodified lines
6001 6001
6002 if (to_reserve)6002 if (to_reserve)
6003 trace_btrfs_space_reservation(fs_info, "delalloc",6003 trace_btrfs_space_reservation(fs_info, "delalloc",
6004 btrfs_ino(inode), to_reserve, 1);6004 btrfs_ino(BTRFS_I(inode)), to_reserve, 1);
6005 if (release_extra)6005 if (release_extra)
6006 btrfs_block_rsv_release(fs_info, block_rsv,6006 btrfs_block_rsv_release(fs_info, block_rsv,
6007 btrfs_calc_trans_metadata_size(fs_info, 1));6007 btrfs_calc_trans_metadata_size(fs_info, 1));
@@ -6064,7 +6064,7 @@ out_fail: · 56 unmodified lines
6064 if (to_free) {6064 if (to_free) {
6065 btrfs_block_rsv_release(fs_info, block_rsv, to_free);6065 btrfs_block_rsv_release(fs_info, block_rsv, to_free);
6066 trace_btrfs_space_reservation(fs_info, "delalloc",6066 trace_btrfs_space_reservation(fs_info, "delalloc",
6067 btrfs_ino(inode), to_free, 0);6067 btrfs_ino(BTRFS_I(inode)), to_free, 0);
6068 }6068 }
6069 if (delalloc_lock)6069 if (delalloc_lock)
6070 mutex_unlock(&BTRFS_I(inode)->delalloc_mutex);6070 mutex_unlock(&BTRFS_I(inode)->delalloc_mutex);
@@ -6100,7 +6100,7 @@ void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes) · 29 unmodified lines
6100 return;6100 return;
6101 6101
6102 trace_btrfs_space_reservation(fs_info, "delalloc",6102 trace_btrfs_space_reservation(fs_info, "delalloc",
6103 btrfs_ino(inode), to_free, 0);6103 btrfs_ino(BTRFS_I(inode)), to_free, 0);
6104 6104
6105 btrfs_block_rsv_release(fs_info, &fs_info->delalloc_block_rsv, to_free);6105 btrfs_block_rsv_release(fs_info, &fs_info->delalloc_block_rsv, to_free);
6106}6106}
fs/btrfs/extent_io.c+5−5
@@ -98,7 +98,7 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, · 97 unmodified lines
98 if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) {98 if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) {
99 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info,99 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info,
100 "%s: ino %llu isize %llu odd range [%llu,%llu]",100 "%s: ino %llu isize %llu odd range [%llu,%llu]",
101 caller, btrfs_ino(inode), isize, start, end);101 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end);
102 }102 }
103}103}
104#else104#else
@@ -2065,7 +2065,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical, · 1960 unmodified lines
2065 2065
2066 btrfs_info_rl_in_rcu(fs_info,2066 btrfs_info_rl_in_rcu(fs_info,
2067 "read error corrected: ino %llu off %llu (dev %s sector %llu)",2067 "read error corrected: ino %llu off %llu (dev %s sector %llu)",
2068 btrfs_ino(inode), start,2068 btrfs_ino(BTRFS_I(inode)), start,
2069 rcu_str_deref(dev->name), sector);2069 rcu_str_deref(dev->name), sector);
2070 btrfs_bio_counter_dec(fs_info);2070 btrfs_bio_counter_dec(fs_info);
2071 bio_put(bio);2071 bio_put(bio);
@@ -4413,7 +4413,7 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 2341 unmodified lines
4413 * lookup the last file extent. We're not using i_size here4413 * lookup the last file extent. We're not using i_size here
4414 * because there might be preallocation past i_size4414 * because there might be preallocation past i_size
4415 */4415 */
4416 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(inode), -1,4416 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), -1,
4417 0);4417 0);
4418 if (ret < 0) {4418 if (ret < 0) {
4419 btrfs_free_path(path);4419 btrfs_free_path(path);
@@ -4429,7 +4429,7 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 9 unmodified lines
4429 found_type = found_key.type;4429 found_type = found_key.type;
4430 4430
4431 /* No extents, but there might be delalloc bits */4431 /* No extents, but there might be delalloc bits */
4432 if (found_key.objectid != btrfs_ino(inode) ||4432 if (found_key.objectid != btrfs_ino(BTRFS_I(inode)) ||
4433 found_type != BTRFS_EXTENT_DATA_KEY) {4433 found_type != BTRFS_EXTENT_DATA_KEY) {
4434 /* have to trust i_size as the end */4434 /* have to trust i_size as the end */
4435 last = (u64)-1;4435 last = (u64)-1;
@@ -4539,7 +4539,7 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 103 unmodified lines
4539 */4539 */
4540 ret = btrfs_check_shared(trans, root->fs_info,4540 ret = btrfs_check_shared(trans, root->fs_info,
4541 root->objectid,4541 root->objectid,
4542 btrfs_ino(inode), bytenr);4542 btrfs_ino(BTRFS_I(inode)), bytenr);
4543 if (trans)4543 if (trans)
4544 btrfs_end_transaction(trans);4544 btrfs_end_transaction(trans);
4545 if (ret < 0)4545 if (ret < 0)
fs/btrfs/file-item.c+2−2
@@ -255,7 +255,7 @@ static int __btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio, · 254 unmodified lines
255 } else {255 } else {
256 btrfs_info_rl(fs_info,256 btrfs_info_rl(fs_info,
257 "no csum found for inode %llu start %llu",257 "no csum found for inode %llu start %llu",
258 btrfs_ino(inode), offset);258 btrfs_ino(BTRFS_I(inode)), offset);
259 }259 }
260 item = NULL;260 item = NULL;
261 btrfs_release_path(path);261 btrfs_release_path(path);
@@ -977,7 +977,7 @@ void btrfs_extent_item_to_extent_map(struct inode *inode, · 715 unmodified lines
977 } else {977 } else {
978 btrfs_err(fs_info,978 btrfs_err(fs_info,
979 "unknown file extent item type %d, inode %llu, offset %llu, root %llu",979 "unknown file extent item type %d, inode %llu, offset %llu, root %llu",
980 type, btrfs_ino(inode), extent_start,980 type, btrfs_ino(BTRFS_I(inode)), extent_start,
981 root->root_key.objectid);981 root->root_key.objectid);
982 }982 }
983}983}
fs/btrfs/file.c+6−6
@@ -168,7 +168,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, · 167 unmodified lines
168 if (!defrag)168 if (!defrag)
169 return -ENOMEM;169 return -ENOMEM;
170 170
171 defrag->ino = btrfs_ino(inode);171 defrag->ino = btrfs_ino(BTRFS_I(inode));
172 defrag->transid = transid;172 defrag->transid = transid;
173 defrag->root = root->root_key.objectid;173 defrag->root = root->root_key.objectid;
174 174
@@ -702,7 +702,7 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans, · 527 unmodified lines
702 struct btrfs_file_extent_item *fi;702 struct btrfs_file_extent_item *fi;
703 struct btrfs_key key;703 struct btrfs_key key;
704 struct btrfs_key new_key;704 struct btrfs_key new_key;
705 u64 ino = btrfs_ino(inode);705 u64 ino = btrfs_ino(BTRFS_I(inode));
706 u64 search_start = start;706 u64 search_start = start;
707 u64 disk_bytenr = 0;707 u64 disk_bytenr = 0;
708 u64 num_bytes = 0;708 u64 num_bytes = 0;
@@ -1102,7 +1102,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, · 393 unmodified lines
1102 int del_slot = 0;1102 int del_slot = 0;
1103 int recow;1103 int recow;
1104 int ret;1104 int ret;
1105 u64 ino = btrfs_ino(inode);1105 u64 ino = btrfs_ino(BTRFS_I(inode));
1106 1106
1107 path = btrfs_alloc_path();1107 path = btrfs_alloc_path();
1108 if (!path)1108 if (!path)
@@ -2203,7 +2203,7 @@ static int hole_mergeable(struct inode *inode, struct extent_buffer *leaf, · 1094 unmodified lines
2203 return 0;2203 return 0;
2204 2204
2205 btrfs_item_key_to_cpu(leaf, &key, slot);2205 btrfs_item_key_to_cpu(leaf, &key, slot);
2206 if (key.objectid != btrfs_ino(inode) ||2206 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
2207 key.type != BTRFS_EXTENT_DATA_KEY)2207 key.type != BTRFS_EXTENT_DATA_KEY)
2208 return 0;2208 return 0;
2209 2209
@@ -2237,7 +2237,7 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, · 27 unmodified lines
2237 if (btrfs_fs_incompat(fs_info, NO_HOLES))2237 if (btrfs_fs_incompat(fs_info, NO_HOLES))
2238 goto out;2238 goto out;
2239 2239
2240 key.objectid = btrfs_ino(inode);2240 key.objectid = btrfs_ino(BTRFS_I(inode));
2241 key.type = BTRFS_EXTENT_DATA_KEY;2241 key.type = BTRFS_EXTENT_DATA_KEY;
2242 key.offset = offset;2242 key.offset = offset;
2243 2243
@@ -2285,7 +2285,7 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, · 41 unmodified lines
2285 }2285 }
2286 btrfs_release_path(path);2286 btrfs_release_path(path);
2287 2287
2288 ret = btrfs_insert_file_extent(trans, root, btrfs_ino(inode), offset,2288 ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset,
2289 0, 0, end - offset, 0, end - offset,2289 0, 0, end - offset, 0, end - offset,
2290 0, 0, 0);2290 0, 0, 0);
2291 if (ret)2291 if (ret)
fs/btrfs/free-space-cache.c+1−1
@@ -313,7 +313,7 @@ static int io_ctl_init(struct btrfs_io_ctl *io_ctl, struct inode *inode, · 312 unmodified lines
313 313
314 num_pages = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);314 num_pages = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);
315 315
316 if (btrfs_ino(inode) != BTRFS_FREE_INO_OBJECTID)316 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FREE_INO_OBJECTID)
317 check_crcs = 1;317 check_crcs = 1;
318 318
319 /* Make sure we can fit our crcs into the first page */319 /* Make sure we can fit our crcs into the first page */
fs/btrfs/inode.c+61−61
@@ -166,7 +166,7 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, · 165 unmodified lines
166 struct btrfs_key key;166 struct btrfs_key key;
167 size_t datasize;167 size_t datasize;
168 168
169 key.objectid = btrfs_ino(inode);169 key.objectid = btrfs_ino(BTRFS_I(inode));
170 key.offset = start;170 key.offset = start;
171 key.type = BTRFS_EXTENT_DATA_KEY;171 key.type = BTRFS_EXTENT_DATA_KEY;
172 172
@@ -1265,7 +1265,7 @@ static noinline int run_delalloc_nocow(struct inode *inode, · 1092 unmodified lines
1265 int nocow;1265 int nocow;
1266 int check_prev = 1;1266 int check_prev = 1;
1267 bool nolock;1267 bool nolock;
1268 u64 ino = btrfs_ino(inode);1268 u64 ino = btrfs_ino(BTRFS_I(inode));
1269 1269
1270 path = btrfs_alloc_path();1270 path = btrfs_alloc_path();
1271 if (!path) {1271 if (!path) {
@@ -2149,7 +2149,7 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans, · 877 unmodified lines
2149 goto out;2149 goto out;
2150 2150
2151 if (!extent_inserted) {2151 if (!extent_inserted) {
2152 ins.objectid = btrfs_ino(inode);2152 ins.objectid = btrfs_ino(BTRFS_I(inode));
2153 ins.offset = file_pos;2153 ins.offset = file_pos;
2154 ins.type = BTRFS_EXTENT_DATA_KEY;2154 ins.type = BTRFS_EXTENT_DATA_KEY;
2155 2155
@@ -2182,7 +2182,7 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans, · 26 unmodified lines
2182 ins.offset = disk_num_bytes;2182 ins.offset = disk_num_bytes;
2183 ins.type = BTRFS_EXTENT_ITEM_KEY;2183 ins.type = BTRFS_EXTENT_ITEM_KEY;
2184 ret = btrfs_alloc_reserved_file_extent(trans, root->root_key.objectid,2184 ret = btrfs_alloc_reserved_file_extent(trans, root->root_key.objectid,
2185 btrfs_ino(inode), file_pos,2185 btrfs_ino(BTRFS_I(inode)), file_pos,
2186 ram_bytes, &ins);2186 ram_bytes, &ins);
2187 /*2187 /*
2188 * Release the reserved range from inode dirty range map, as it is2188 * Release the reserved range from inode dirty range map, as it is
@@ -2308,7 +2308,7 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id, · 119 unmodified lines
2308 u64 num_bytes;2308 u64 num_bytes;
2309 2309
2310 if (BTRFS_I(inode)->root->root_key.objectid == root_id &&2310 if (BTRFS_I(inode)->root->root_key.objectid == root_id &&
2311 inum == btrfs_ino(inode))2311 inum == btrfs_ino(BTRFS_I(inode)))
2312 return 0;2312 return 0;
2313 2313
2314 key.objectid = root_id;2314 key.objectid = root_id;
@@ -2577,7 +2577,7 @@ static noinline int relink_extent_backref(struct btrfs_path *path, · 262 unmodified lines
2577 if (ret)2577 if (ret)
2578 goto out_free_path;2578 goto out_free_path;
2579again:2579again:
2580 key.objectid = btrfs_ino(inode);2580 key.objectid = btrfs_ino(BTRFS_I(inode));
2581 key.type = BTRFS_EXTENT_DATA_KEY;2581 key.type = BTRFS_EXTENT_DATA_KEY;
2582 key.offset = start;2582 key.offset = start;
2583 2583
@@ -2756,7 +2756,7 @@ record_old_file_extents(struct inode *inode, · 172 unmodified lines
2756 if (!path)2756 if (!path)
2757 goto out_kfree;2757 goto out_kfree;
2758 2758
2759 key.objectid = btrfs_ino(inode);2759 key.objectid = btrfs_ino(BTRFS_I(inode));
2760 key.type = BTRFS_EXTENT_DATA_KEY;2760 key.type = BTRFS_EXTENT_DATA_KEY;
2761 key.offset = new->file_pos;2761 key.offset = new->file_pos;
2762 2762
@@ -2791,7 +2791,7 @@ record_old_file_extents(struct inode *inode, · 28 unmodified lines
2791 2791
2792 btrfs_item_key_to_cpu(l, &key, slot);2792 btrfs_item_key_to_cpu(l, &key, slot);
2793 2793
2794 if (key.objectid != btrfs_ino(inode))2794 if (key.objectid != btrfs_ino(BTRFS_I(inode)))
2795 break;2795 break;
2796 if (key.type != BTRFS_EXTENT_DATA_KEY)2796 if (key.type != BTRFS_EXTENT_DATA_KEY)
2797 break;2797 break;
@@ -3113,7 +3113,7 @@ static int __readpage_endio_check(struct inode *inode, · 315 unmodified lines
3113zeroit:3113zeroit:
3114 btrfs_warn_rl(BTRFS_I(inode)->root->fs_info,3114 btrfs_warn_rl(BTRFS_I(inode)->root->fs_info,
3115 "csum failed ino %llu off %llu csum %u expected csum %u",3115 "csum failed ino %llu off %llu csum %u expected csum %u",
3116 btrfs_ino(inode), start, csum, csum_expected);3116 btrfs_ino(BTRFS_I(inode)), start, csum, csum_expected);
3117 memset(kaddr + pgoff, 1, len);3117 memset(kaddr + pgoff, 1, len);
3118 flush_dcache_page(page);3118 flush_dcache_page(page);
3119 kunmap_atomic(kaddr);3119 kunmap_atomic(kaddr);
@@ -3314,7 +3314,7 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) · 194 unmodified lines
3314 3314
3315 /* insert an orphan item to track this unlinked/truncated file */3315 /* insert an orphan item to track this unlinked/truncated file */
3316 if (insert >= 1) {3316 if (insert >= 1) {
3317 ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(inode));3317 ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(BTRFS_I(inode)));
3318 if (ret) {3318 if (ret) {
3319 atomic_dec(&root->orphan_inodes);3319 atomic_dec(&root->orphan_inodes);
3320 if (reserve) {3320 if (reserve) {
@@ -3370,7 +3370,7 @@ static int btrfs_orphan_del(struct btrfs_trans_handle *trans, · 49 unmodified lines
3370 atomic_dec(&root->orphan_inodes);3370 atomic_dec(&root->orphan_inodes);
3371 if (trans)3371 if (trans)
3372 ret = btrfs_del_orphan_item(trans, root,3372 ret = btrfs_del_orphan_item(trans, root,
3373 btrfs_ino(inode));3373 btrfs_ino(BTRFS_I(inode)));
3374 }3374 }
3375 3375
3376 if (release_rsv)3376 if (release_rsv)
@@ -3777,7 +3777,7 @@ cache_index: · 400 unmodified lines
3777 goto cache_acl;3777 goto cache_acl;
3778 3778
3779 btrfs_item_key_to_cpu(leaf, &location, path->slots[0]);3779 btrfs_item_key_to_cpu(leaf, &location, path->slots[0]);
3780 if (location.objectid != btrfs_ino(inode))3780 if (location.objectid != btrfs_ino(BTRFS_I(inode)))
3781 goto cache_acl;3781 goto cache_acl;
3782 3782
3783 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);3783 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
@@ -3799,14 +3799,14 @@ cache_acl: · 15 unmodified lines
3799 * any xattrs or acls3799 * any xattrs or acls
3800 */3800 */
3801 maybe_acls = acls_after_inode_item(leaf, path->slots[0],3801 maybe_acls = acls_after_inode_item(leaf, path->slots[0],
3802 btrfs_ino(inode), &first_xattr_slot);3802 btrfs_ino(BTRFS_I(inode)), &first_xattr_slot);
3803 if (first_xattr_slot != -1) {3803 if (first_xattr_slot != -1) {
3804 path->slots[0] = first_xattr_slot;3804 path->slots[0] = first_xattr_slot;
3805 ret = btrfs_load_inode_props(inode, path);3805 ret = btrfs_load_inode_props(inode, path);
3806 if (ret)3806 if (ret)
3807 btrfs_err(fs_info,3807 btrfs_err(fs_info,
3808 "error loading props for ino %llu (root %llu): %d",3808 "error loading props for ino %llu (root %llu): %d",
3809 btrfs_ino(inode),3809 btrfs_ino(BTRFS_I(inode)),
3810 root->root_key.objectid, ret);3810 root->root_key.objectid, ret);
3811 }3811 }
3812 btrfs_free_path(path);3812 btrfs_free_path(path);
@@ -3991,8 +3991,8 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, · 178 unmodified lines
3991 struct btrfs_dir_item *di;3991 struct btrfs_dir_item *di;
3992 struct btrfs_key key;3992 struct btrfs_key key;
3993 u64 index;3993 u64 index;
3994 u64 ino = btrfs_ino(inode);3994 u64 ino = btrfs_ino(BTRFS_I(inode));
3995 u64 dir_ino = btrfs_ino(dir);3995 u64 dir_ino = btrfs_ino(BTRFS_I(dir));
3996 3996
3997 path = btrfs_alloc_path();3997 path = btrfs_alloc_path();
3998 if (!path) {3998 if (!path) {
@@ -4158,7 +4158,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, · 159 unmodified lines
4158 struct btrfs_key key;4158 struct btrfs_key key;
4159 u64 index;4159 u64 index;
4160 int ret;4160 int ret;
4161 u64 dir_ino = btrfs_ino(dir);4161 u64 dir_ino = btrfs_ino(BTRFS_I(dir));
4162 4162
4163 path = btrfs_alloc_path();4163 path = btrfs_alloc_path();
4164 if (!path)4164 if (!path)
@@ -4237,14 +4237,14 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) · 72 unmodified lines
4237 4237
4238 if (inode->i_size > BTRFS_EMPTY_DIR_SIZE)4238 if (inode->i_size > BTRFS_EMPTY_DIR_SIZE)
4239 return -ENOTEMPTY;4239 return -ENOTEMPTY;
4240 if (btrfs_ino(inode) == BTRFS_FIRST_FREE_OBJECTID)4240 if (btrfs_ino(BTRFS_I(inode)) == BTRFS_FIRST_FREE_OBJECTID)
4241 return -EPERM;4241 return -EPERM;
4242 4242
4243 trans = __unlink_start_trans(dir);4243 trans = __unlink_start_trans(dir);
4244 if (IS_ERR(trans))4244 if (IS_ERR(trans))
4245 return PTR_ERR(trans);4245 return PTR_ERR(trans);
4246 4246
4247 if (unlikely(btrfs_ino(inode) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {4247 if (unlikely(btrfs_ino(BTRFS_I(inode)) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
4248 err = btrfs_unlink_subvol(trans, root, dir,4248 err = btrfs_unlink_subvol(trans, root, dir,
4249 BTRFS_I(inode)->location.objectid,4249 BTRFS_I(inode)->location.objectid,
4250 dentry->d_name.name,4250 dentry->d_name.name,
@@ -4386,7 +4386,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, · 135 unmodified lines
4386 int extent_type = -1;4386 int extent_type = -1;
4387 int ret;4387 int ret;
4388 int err = 0;4388 int err = 0;
4389 u64 ino = btrfs_ino(inode);4389 u64 ino = btrfs_ino(BTRFS_I(inode));
4390 u64 bytes_deleted = 0;4390 u64 bytes_deleted = 0;
4391 bool be_nice = 0;4391 bool be_nice = 0;
4392 bool should_throttle = 0;4392 bool should_throttle = 0;
@@ -4858,7 +4858,7 @@ static int maybe_insert_hole(struct btrfs_root *root, struct inode *inode, · 465 unmodified lines
4858 return ret;4858 return ret;
4859 }4859 }
4860 4860
4861 ret = btrfs_insert_file_extent(trans, root, btrfs_ino(inode), offset,4861 ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset,
4862 0, 0, len, 0, len, 0, 0, 0);4862 0, 0, len, 0, len, 0, 0, 0);
4863 if (ret)4863 if (ret)
4864 btrfs_abort_transaction(trans, ret);4864 btrfs_abort_transaction(trans, ret);
@@ -5390,7 +5390,7 @@ void btrfs_evict_inode(struct inode *inode) · 525 unmodified lines
5390 trans->block_rsv = &fs_info->trans_block_rsv;5390 trans->block_rsv = &fs_info->trans_block_rsv;
5391 if (!(root == fs_info->tree_root ||5391 if (!(root == fs_info->tree_root ||
5392 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID))5392 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID))
5393 btrfs_return_ino(root, btrfs_ino(inode));5393 btrfs_return_ino(root, btrfs_ino(BTRFS_I(inode)));
5394 5394
5395 btrfs_end_transaction(trans);5395 btrfs_end_transaction(trans);
5396 btrfs_btree_balance_dirty(fs_info);5396 btrfs_btree_balance_dirty(fs_info);
@@ -5417,7 +5417,7 @@ static int btrfs_inode_by_name(struct inode *dir, struct dentry *dentry, · 20 unmodified lines
5417 if (!path)5417 if (!path)
5418 return -ENOMEM;5418 return -ENOMEM;
5419 5419
5420 di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(dir), name,5420 di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(BTRFS_I(dir)), name,
5421 namelen, 0);5421 namelen, 0);
5422 if (IS_ERR(di))5422 if (IS_ERR(di))
5423 ret = PTR_ERR(di);5423 ret = PTR_ERR(di);
@@ -5473,7 +5473,7 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info, · 49 unmodified lines
5473 5473
5474 leaf = path->nodes[0];5474 leaf = path->nodes[0];
5475 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref);5475 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref);
5476 if (btrfs_root_ref_dirid(leaf, ref) != btrfs_ino(dir) ||5476 if (btrfs_root_ref_dirid(leaf, ref) != btrfs_ino(BTRFS_I(dir)) ||
5477 btrfs_root_ref_name_len(leaf, ref) != dentry->d_name.len)5477 btrfs_root_ref_name_len(leaf, ref) != dentry->d_name.len)
5478 goto out;5478 goto out;
5479 5479
@@ -5508,7 +5508,7 @@ static void inode_tree_add(struct inode *inode) · 28 unmodified lines
5508 struct rb_node **p;5508 struct rb_node **p;
5509 struct rb_node *parent;5509 struct rb_node *parent;
5510 struct rb_node *new = &BTRFS_I(inode)->rb_node;5510 struct rb_node *new = &BTRFS_I(inode)->rb_node;
5511 u64 ino = btrfs_ino(inode);5511 u64 ino = btrfs_ino(BTRFS_I(inode));
5512 5512
5513 if (inode_unhashed(inode))5513 if (inode_unhashed(inode))
5514 return;5514 return;
@@ -5519,9 +5519,9 @@ static void inode_tree_add(struct inode *inode) · 4 unmodified lines
5519 parent = *p;5519 parent = *p;
5520 entry = rb_entry(parent, struct btrfs_inode, rb_node);5520 entry = rb_entry(parent, struct btrfs_inode, rb_node);
5521 5521
5522 if (ino < btrfs_ino(&entry->vfs_inode))5522 if (ino < btrfs_ino(BTRFS_I(&entry->vfs_inode)))
5523 p = &parent->rb_left;5523 p = &parent->rb_left;
5524 else if (ino > btrfs_ino(&entry->vfs_inode))5524 else if (ino > btrfs_ino(BTRFS_I(&entry->vfs_inode)))
5525 p = &parent->rb_right;5525 p = &parent->rb_right;
5526 else {5526 else {
5527 WARN_ON(!(entry->vfs_inode.i_state &5527 WARN_ON(!(entry->vfs_inode.i_state &
@@ -5581,9 +5581,9 @@ again: · 53 unmodified lines
5581 prev = node;5581 prev = node;
5582 entry = rb_entry(node, struct btrfs_inode, rb_node);5582 entry = rb_entry(node, struct btrfs_inode, rb_node);
5583 5583
5584 if (objectid < btrfs_ino(&entry->vfs_inode))5584 if (objectid < btrfs_ino(BTRFS_I(&entry->vfs_inode)))
5585 node = node->rb_left;5585 node = node->rb_left;
5586 else if (objectid > btrfs_ino(&entry->vfs_inode))5586 else if (objectid > btrfs_ino(BTRFS_I(&entry->vfs_inode)))
5587 node = node->rb_right;5587 node = node->rb_right;
5588 else5588 else
5589 break;5589 break;
@@ -5591,7 +5591,7 @@ again: · 1 unmodified line
5591 if (!node) {5591 if (!node) {
5592 while (prev) {5592 while (prev) {
5593 entry = rb_entry(prev, struct btrfs_inode, rb_node);5593 entry = rb_entry(prev, struct btrfs_inode, rb_node);
5594 if (objectid <= btrfs_ino(&entry->vfs_inode)) {5594 if (objectid <= btrfs_ino(BTRFS_I(&entry->vfs_inode))) {
5595 node = prev;5595 node = prev;
5596 break;5596 break;
5597 }5597 }
@@ -5600,7 +5600,7 @@ again: · 2 unmodified lines
5600 }5600 }
5601 while (node) {5601 while (node) {
5602 entry = rb_entry(node, struct btrfs_inode, rb_node);5602 entry = rb_entry(node, struct btrfs_inode, rb_node);
5603 objectid = btrfs_ino(&entry->vfs_inode) + 1;5603 objectid = btrfs_ino(BTRFS_I(&entry->vfs_inode)) + 1;
5604 inode = igrab(&entry->vfs_inode);5604 inode = igrab(&entry->vfs_inode);
5605 if (inode) {5605 if (inode) {
5606 spin_unlock(&root->inode_lock);5606 spin_unlock(&root->inode_lock);
@@ -5784,7 +5784,7 @@ static int btrfs_dentry_delete(const struct dentry *dentry) · 177 unmodified lines
5784 if (btrfs_root_refs(&root->root_item) == 0)5784 if (btrfs_root_refs(&root->root_item) == 0)
5785 return 1;5785 return 1;
5786 5786
5787 if (btrfs_ino(inode) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)5787 if (btrfs_ino(BTRFS_I(inode)) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)
5788 return 1;5788 return 1;
5789 }5789 }
5790 return 0;5790 return 0;
@@ -5853,7 +5853,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx) · 62 unmodified lines
5853 5853
5854 key.type = BTRFS_DIR_INDEX_KEY;5854 key.type = BTRFS_DIR_INDEX_KEY;
5855 key.offset = ctx->pos;5855 key.offset = ctx->pos;
5856 key.objectid = btrfs_ino(inode);5856 key.objectid = btrfs_ino(BTRFS_I(inode));
5857 5857
5858 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);5858 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5859 if (ret < 0)5859 if (ret < 0)
@@ -6050,7 +6050,7 @@ static int btrfs_set_inode_index_count(struct inode *inode) · 190 unmodified lines
6050 struct extent_buffer *leaf;6050 struct extent_buffer *leaf;
6051 int ret;6051 int ret;
6052 6052
6053 key.objectid = btrfs_ino(inode);6053 key.objectid = btrfs_ino(BTRFS_I(inode));
6054 key.type = BTRFS_DIR_INDEX_KEY;6054 key.type = BTRFS_DIR_INDEX_KEY;
6055 key.offset = (u64)-1;6055 key.offset = (u64)-1;
6056 6056
@@ -6082,7 +6082,7 @@ static int btrfs_set_inode_index_count(struct inode *inode) · 25 unmodified lines
6082 leaf = path->nodes[0];6082 leaf = path->nodes[0];
6083 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);6083 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
6084 6084
6085 if (found_key.objectid != btrfs_ino(inode) ||6085 if (found_key.objectid != btrfs_ino(BTRFS_I(inode)) ||
6086 found_key.type != BTRFS_DIR_INDEX_KEY) {6086 found_key.type != BTRFS_DIR_INDEX_KEY) {
6087 BTRFS_I(inode)->index_cnt = 2;6087 BTRFS_I(inode)->index_cnt = 2;
6088 goto out;6088 goto out;
@@ -6282,7 +6282,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, · 193 unmodified lines
6282 if (ret)6282 if (ret)
6283 btrfs_err(fs_info,6283 btrfs_err(fs_info,
6284 "error inheriting props for ino %llu (root %llu): %d",6284 "error inheriting props for ino %llu (root %llu): %d",
6285 btrfs_ino(inode), root->root_key.objectid, ret);6285 btrfs_ino(BTRFS_I(inode)), root->root_key.objectid, ret);
6286 6286
6287 return inode;6287 return inode;
6288 6288
@@ -6315,8 +6315,8 @@ int btrfs_add_link(struct btrfs_trans_handle *trans, · 26 unmodified lines
6315 int ret = 0;6315 int ret = 0;
6316 struct btrfs_key key;6316 struct btrfs_key key;
6317 struct btrfs_root *root = BTRFS_I(parent_inode)->root;6317 struct btrfs_root *root = BTRFS_I(parent_inode)->root;
6318 u64 ino = btrfs_ino(inode);6318 u64 ino = btrfs_ino(BTRFS_I(inode));
6319 u64 parent_ino = btrfs_ino(parent_inode);6319 u64 parent_ino = btrfs_ino(BTRFS_I(parent_inode));
6320 6320
6321 if (unlikely(ino == BTRFS_FIRST_FREE_OBJECTID)) {6321 if (unlikely(ino == BTRFS_FIRST_FREE_OBJECTID)) {
6322 memcpy(&key, &BTRFS_I(inode)->root->root_key, sizeof(key));6322 memcpy(&key, &BTRFS_I(inode)->root->root_key, sizeof(key));
@@ -6415,7 +6415,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, · 92 unmodified lines
6415 goto out_unlock;6415 goto out_unlock;
6416 6416
6417 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,6417 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
6418 dentry->d_name.len, btrfs_ino(dir), objectid,6418 dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid,
6419 mode, &index);6419 mode, &index);
6420 if (IS_ERR(inode)) {6420 if (IS_ERR(inode)) {
6421 err = PTR_ERR(inode);6421 err = PTR_ERR(inode);
@@ -6487,7 +6487,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry, · 65 unmodified lines
6487 goto out_unlock;6487 goto out_unlock;
6488 6488
6489 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,6489 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
6490 dentry->d_name.len, btrfs_ino(dir), objectid,6490 dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid,
6491 mode, &index);6491 mode, &index);
6492 if (IS_ERR(inode)) {6492 if (IS_ERR(inode)) {
6493 err = PTR_ERR(inode);6493 err = PTR_ERR(inode);
@@ -6637,7 +6637,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) · 143 unmodified lines
6637 goto out_fail;6637 goto out_fail;
6638 6638
6639 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,6639 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
6640 dentry->d_name.len, btrfs_ino(dir), objectid,6640 dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid,
6641 S_IFDIR | mode, &index);6641 S_IFDIR | mode, &index);
6642 if (IS_ERR(inode)) {6642 if (IS_ERR(inode)) {
6643 err = PTR_ERR(inode);6643 err = PTR_ERR(inode);
@@ -6798,7 +6798,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page, · 154 unmodified lines
6798 int err = 0;6798 int err = 0;
6799 u64 extent_start = 0;6799 u64 extent_start = 0;
6800 u64 extent_end = 0;6800 u64 extent_end = 0;
6801 u64 objectid = btrfs_ino(inode);6801 u64 objectid = btrfs_ino(BTRFS_I(inode));
6802 u32 found_type;6802 u32 found_type;
6803 struct btrfs_path *path = NULL;6803 struct btrfs_path *path = NULL;
6804 struct btrfs_root *root = BTRFS_I(inode)->root;6804 struct btrfs_root *root = BTRFS_I(inode)->root;
@@ -7056,7 +7056,7 @@ insert: · 251 unmodified lines
7056 write_unlock(&em_tree->lock);7056 write_unlock(&em_tree->lock);
7057out:7057out:
7058 7058
7059 trace_btrfs_get_extent(root, inode, em);7059 trace_btrfs_get_extent(root, BTRFS_I(inode), em);
7060 7060
7061 btrfs_free_path(path);7061 btrfs_free_path(path);
7062 if (trans) {7062 if (trans) {
@@ -7290,7 +7290,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, · 227 unmodified lines
7290 if (!path)7290 if (!path)
7291 return -ENOMEM;7291 return -ENOMEM;
7292 7292
7293 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(inode),7293 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)),
7294 offset, 0);7294 offset, 0);
7295 if (ret < 0)7295 if (ret < 0)
7296 goto out;7296 goto out;
@@ -7307,7 +7307,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, · 10 unmodified lines
7307 ret = 0;7307 ret = 0;
7308 leaf = path->nodes[0];7308 leaf = path->nodes[0];
7309 btrfs_item_key_to_cpu(leaf, &key, slot);7309 btrfs_item_key_to_cpu(leaf, &key, slot);
7310 if (key.objectid != btrfs_ino(inode) ||7310 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
7311 key.type != BTRFS_EXTENT_DATA_KEY) {7311 key.type != BTRFS_EXTENT_DATA_KEY) {
7312 /* not our file or wrong item type, must cow */7312 /* not our file or wrong item type, must cow */
7313 goto out;7313 goto out;
@@ -7379,7 +7379,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, · 65 unmodified lines
7379 goto out;7379 goto out;
7380 }7380 }
7381 7381
7382 ret = btrfs_cross_ref_exist(trans, root, btrfs_ino(inode),7382 ret = btrfs_cross_ref_exist(trans, root, btrfs_ino(BTRFS_I(inode)),
7383 key.offset - backref_offset, disk_bytenr);7383 key.offset - backref_offset, disk_bytenr);
7384 btrfs_end_transaction(trans);7384 btrfs_end_transaction(trans);
7385 if (ret) {7385 if (ret) {
@@ -8240,7 +8240,7 @@ static void btrfs_end_dio_bio(struct bio *bio) · 854 unmodified lines
8240 if (err)8240 if (err)
8241 btrfs_warn(BTRFS_I(dip->inode)->root->fs_info,8241 btrfs_warn(BTRFS_I(dip->inode)->root->fs_info,
8242 "direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d",8242 "direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d",
8243 btrfs_ino(dip->inode), bio_op(bio), bio->bi_opf,8243 btrfs_ino(BTRFS_I(dip->inode)), bio_op(bio), bio->bi_opf,
8244 (unsigned long long)bio->bi_iter.bi_sector,8244 (unsigned long long)bio->bi_iter.bi_sector,
8245 bio->bi_iter.bi_size, err);8245 bio->bi_iter.bi_size, err);
8246 8246
@@ -9368,7 +9368,7 @@ void btrfs_destroy_inode(struct inode *inode) · 1121 unmodified lines
9368 if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,9368 if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
9369 &BTRFS_I(inode)->runtime_flags)) {9369 &BTRFS_I(inode)->runtime_flags)) {
9370 btrfs_info(fs_info, "inode %llu still on the orphan list",9370 btrfs_info(fs_info, "inode %llu still on the orphan list",
9371 btrfs_ino(inode));9371 btrfs_ino(BTRFS_I(inode)));
9372 atomic_dec(&root->orphan_inodes);9372 atomic_dec(&root->orphan_inodes);
9373 }9373 }
9374 9374
@@ -9497,8 +9497,8 @@ static int btrfs_rename_exchange(struct inode *old_dir, · 122 unmodified lines
9497 struct inode *old_inode = old_dentry->d_inode;9497 struct inode *old_inode = old_dentry->d_inode;
9498 struct timespec ctime = current_time(old_inode);9498 struct timespec ctime = current_time(old_inode);
9499 struct dentry *parent;9499 struct dentry *parent;
9500 u64 old_ino = btrfs_ino(old_inode);9500 u64 old_ino = btrfs_ino(BTRFS_I(old_inode));
9501 u64 new_ino = btrfs_ino(new_inode);9501 u64 new_ino = btrfs_ino(BTRFS_I(new_inode));
9502 u64 old_idx = 0;9502 u64 old_idx = 0;
9503 u64 new_idx = 0;9503 u64 new_idx = 0;
9504 u64 root_objectid;9504 u64 root_objectid;
@@ -9555,7 +9555,7 @@ static int btrfs_rename_exchange(struct inode *old_dir, · 50 unmodified lines
9555 new_dentry->d_name.name,9555 new_dentry->d_name.name,
9556 new_dentry->d_name.len,9556 new_dentry->d_name.len,
9557 old_ino,9557 old_ino,
9558 btrfs_ino(new_dir), old_idx);9558 btrfs_ino(BTRFS_I(new_dir)), old_idx);
9559 if (ret)9559 if (ret)
9560 goto out_fail;9560 goto out_fail;
9561 }9561 }
@@ -9571,7 +9571,7 @@ static int btrfs_rename_exchange(struct inode *old_dir, · 9 unmodified lines
9571 old_dentry->d_name.name,9571 old_dentry->d_name.name,
9572 old_dentry->d_name.len,9572 old_dentry->d_name.len,
9573 new_ino,9573 new_ino,
9574 btrfs_ino(old_dir), new_idx);9574 btrfs_ino(BTRFS_I(old_dir)), new_idx);
9575 if (ret)9575 if (ret)
9576 goto out_fail;9576 goto out_fail;
9577 }9577 }
@@ -9720,7 +9720,7 @@ static int btrfs_whiteout_for_rename(struct btrfs_trans_handle *trans, · 142 unmodified lines
9720 inode = btrfs_new_inode(trans, root, dir,9720 inode = btrfs_new_inode(trans, root, dir,
9721 dentry->d_name.name,9721 dentry->d_name.name,
9722 dentry->d_name.len,9722 dentry->d_name.len,
9723 btrfs_ino(dir),9723 btrfs_ino(BTRFS_I(dir)),
9724 objectid,9724 objectid,
9725 S_IFCHR | WHITEOUT_MODE,9725 S_IFCHR | WHITEOUT_MODE,
9726 &index);9726 &index);
@@ -9768,10 +9768,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, · 41 unmodified lines
9768 u64 index = 0;9768 u64 index = 0;
9769 u64 root_objectid;9769 u64 root_objectid;
9770 int ret;9770 int ret;
9771 u64 old_ino = btrfs_ino(old_inode);9771 u64 old_ino = btrfs_ino(BTRFS_I(old_inode));
9772 bool log_pinned = false;9772 bool log_pinned = false;
9773 9773
9774 if (btrfs_ino(new_dir) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)9774 if (btrfs_ino(BTRFS_I(new_dir)) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)
9775 return -EPERM;9775 return -EPERM;
9776 9776
9777 /* we only allow rename subvolume link between subvolumes */9777 /* we only allow rename subvolume link between subvolumes */
@@ -9779,7 +9779,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, · 1 unmodified line
9779 return -EXDEV;9779 return -EXDEV;
9780 9780
9781 if (old_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID ||9781 if (old_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID ||
9782 (new_inode && btrfs_ino(new_inode) == BTRFS_FIRST_FREE_OBJECTID))9782 (new_inode && btrfs_ino(BTRFS_I(new_inode)) == BTRFS_FIRST_FREE_OBJECTID))
9783 return -ENOTEMPTY;9783 return -ENOTEMPTY;
9784 9784
9785 if (S_ISDIR(old_inode->i_mode) && new_inode &&9785 if (S_ISDIR(old_inode->i_mode) && new_inode &&
@@ -9854,7 +9854,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, · 68 unmodified lines
9854 new_dentry->d_name.name,9854 new_dentry->d_name.name,
9855 new_dentry->d_name.len,9855 new_dentry->d_name.len,
9856 old_ino,9856 old_ino,
9857 btrfs_ino(new_dir), index);9857 btrfs_ino(BTRFS_I(new_dir)), index);
9858 if (ret)9858 if (ret)
9859 goto out_fail;9859 goto out_fail;
9860 }9860 }
@@ -9890,7 +9890,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, · 29 unmodified lines
9890 if (new_inode) {9890 if (new_inode) {
9891 inode_inc_iversion(new_inode);9891 inode_inc_iversion(new_inode);
9892 new_inode->i_ctime = current_time(new_inode);9892 new_inode->i_ctime = current_time(new_inode);
9893 if (unlikely(btrfs_ino(new_inode) ==9893 if (unlikely(btrfs_ino(BTRFS_I(new_inode)) ==
9894 BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {9894 BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
9895 root_objectid = BTRFS_I(new_inode)->location.objectid;9895 root_objectid = BTRFS_I(new_inode)->location.objectid;
9896 ret = btrfs_unlink_subvol(trans, dest, new_dir,9896 ret = btrfs_unlink_subvol(trans, dest, new_dir,
@@ -10221,7 +10221,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, · 324 unmodified lines
10221 goto out_unlock;10221 goto out_unlock;
10222 10222
10223 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,10223 inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
10224 dentry->d_name.len, btrfs_ino(dir), objectid,10224 dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid,
10225 S_IFLNK|S_IRWXUGO, &index);10225 S_IFLNK|S_IRWXUGO, &index);
10226 if (IS_ERR(inode)) {10226 if (IS_ERR(inode)) {
10227 err = PTR_ERR(inode);10227 err = PTR_ERR(inode);
@@ -10248,7 +10248,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, · 20 unmodified lines
10248 err = -ENOMEM;10248 err = -ENOMEM;
10249 goto out_unlock_inode;10249 goto out_unlock_inode;
10250 }10250 }
10251 key.objectid = btrfs_ino(inode);10251 key.objectid = btrfs_ino(BTRFS_I(inode));
10252 key.offset = 0;10252 key.offset = 0;
10253 key.type = BTRFS_EXTENT_DATA_KEY;10253 key.type = BTRFS_EXTENT_DATA_KEY;
10254 datasize = btrfs_file_extent_calc_inline_size(name_len);10254 datasize = btrfs_file_extent_calc_inline_size(name_len);
@@ -10501,7 +10501,7 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) · 246 unmodified lines
10501 goto out;10501 goto out;
10502 10502
10503 inode = btrfs_new_inode(trans, root, dir, NULL, 0,10503 inode = btrfs_new_inode(trans, root, dir, NULL, 0,
10504 btrfs_ino(dir), objectid, mode, &index);10504 btrfs_ino(BTRFS_I(dir)), objectid, mode, &index);
10505 if (IS_ERR(inode)) {10505 if (IS_ERR(inode)) {
10506 ret = PTR_ERR(inode);10506 ret = PTR_ERR(inode);
10507 inode = NULL;10507 inode = NULL;
fs/btrfs/ioctl.c+13−13
@@ -601,7 +601,7 @@ static noinline int create_subvol(struct inode *dir, · 600 unmodified lines
601 601
602 ret = btrfs_add_root_ref(trans, fs_info,602 ret = btrfs_add_root_ref(trans, fs_info,
603 objectid, root->root_key.objectid,603 objectid, root->root_key.objectid,
604 btrfs_ino(dir), index, name, namelen);604 btrfs_ino(BTRFS_I(dir)), index, name, namelen);
605 BUG_ON(ret);605 BUG_ON(ret);
606 606
607 ret = btrfs_uuid_tree_add(trans, fs_info, root_item->uuid,607 ret = btrfs_uuid_tree_add(trans, fs_info, root_item->uuid,
@@ -941,7 +941,7 @@ static int find_new_extents(struct btrfs_root *root, · 333 unmodified lines
941 struct btrfs_file_extent_item *extent;941 struct btrfs_file_extent_item *extent;
942 int type;942 int type;
943 int ret;943 int ret;
944 u64 ino = btrfs_ino(inode);944 u64 ino = btrfs_ino(BTRFS_I(inode));
945 945
946 path = btrfs_alloc_path();946 path = btrfs_alloc_path();
947 if (!path)947 if (!path)
@@ -1780,7 +1780,7 @@ static noinline int btrfs_ioctl_subvol_getflags(struct file *file, · 832 unmodified lines
1780 int ret = 0;1780 int ret = 0;
1781 u64 flags = 0;1781 u64 flags = 0;
1782 1782
1783 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID)1783 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID)
1784 return -EINVAL;1784 return -EINVAL;
1785 1785
1786 down_read(&fs_info->subvol_sem);1786 down_read(&fs_info->subvol_sem);
@@ -1812,7 +1812,7 @@ static noinline int btrfs_ioctl_subvol_setflags(struct file *file, · 25 unmodified lines
1812 if (ret)1812 if (ret)
1813 goto out;1813 goto out;
1814 1814
1815 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) {1815 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID) {
1816 ret = -EINVAL;1816 ret = -EINVAL;
1817 goto out_drop_write;1817 goto out_drop_write;
1818 }1818 }
@@ -2446,7 +2446,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, · 627 unmodified lines
2446 if (err)2446 if (err)
2447 goto out_dput;2447 goto out_dput;
2448 2448
2449 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) {2449 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID) {
2450 err = -EINVAL;2450 err = -EINVAL;
2451 goto out_dput;2451 goto out_dput;
2452 }2452 }
@@ -3417,7 +3417,7 @@ static int clone_copy_inline_extent(struct inode *src, · 964 unmodified lines
3417 if (new_key->offset > 0)3417 if (new_key->offset > 0)
3418 return -EOPNOTSUPP;3418 return -EOPNOTSUPP;
3419 3419
3420 key.objectid = btrfs_ino(dst);3420 key.objectid = btrfs_ino(BTRFS_I(dst));
3421 key.type = BTRFS_EXTENT_DATA_KEY;3421 key.type = BTRFS_EXTENT_DATA_KEY;
3422 key.offset = 0;3422 key.offset = 0;
3423 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);3423 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
@@ -3432,7 +3432,7 @@ static int clone_copy_inline_extent(struct inode *src, · 8 unmodified lines
3432 goto copy_inline_extent;3432 goto copy_inline_extent;
3433 }3433 }
3434 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);3434 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
3435 if (key.objectid == btrfs_ino(dst) &&3435 if (key.objectid == btrfs_ino(BTRFS_I(dst)) &&
3436 key.type == BTRFS_EXTENT_DATA_KEY) {3436 key.type == BTRFS_EXTENT_DATA_KEY) {
3437 ASSERT(key.offset > 0);3437 ASSERT(key.offset > 0);
3438 return -EOPNOTSUPP;3438 return -EOPNOTSUPP;
@@ -3466,7 +3466,7 @@ static int clone_copy_inline_extent(struct inode *src, · 27 unmodified lines
3466 } else if (ret == 0) {3466 } else if (ret == 0) {
3467 btrfs_item_key_to_cpu(path->nodes[0], &key,3467 btrfs_item_key_to_cpu(path->nodes[0], &key,
3468 path->slots[0]);3468 path->slots[0]);
3469 if (key.objectid == btrfs_ino(dst) &&3469 if (key.objectid == btrfs_ino(BTRFS_I(dst)) &&
3470 key.type == BTRFS_EXTENT_DATA_KEY)3470 key.type == BTRFS_EXTENT_DATA_KEY)
3471 return -EOPNOTSUPP;3471 return -EOPNOTSUPP;
3472 }3472 }
@@ -3560,7 +3560,7 @@ static int btrfs_clone(struct inode *src, struct inode *inode, · 87 unmodified lines
3560 3560
3561 path->reada = READA_FORWARD;3561 path->reada = READA_FORWARD;
3562 /* clone data */3562 /* clone data */
3563 key.objectid = btrfs_ino(src);3563 key.objectid = btrfs_ino(BTRFS_I(src));
3564 key.type = BTRFS_EXTENT_DATA_KEY;3564 key.type = BTRFS_EXTENT_DATA_KEY;
3565 key.offset = off;3565 key.offset = off;
3566 3566
@@ -3603,7 +3603,7 @@ process_slot: · 36 unmodified lines
3603 3603
3604 btrfs_item_key_to_cpu(leaf, &key, slot);3604 btrfs_item_key_to_cpu(leaf, &key, slot);
3605 if (key.type > BTRFS_EXTENT_DATA_KEY ||3605 if (key.type > BTRFS_EXTENT_DATA_KEY ||
3606 key.objectid != btrfs_ino(src))3606 key.objectid != btrfs_ino(BTRFS_I(src)))
3607 break;3607 break;
3608 3608
3609 if (key.type == BTRFS_EXTENT_DATA_KEY) {3609 if (key.type == BTRFS_EXTENT_DATA_KEY) {
@@ -3656,7 +3656,7 @@ process_slot: · 46 unmodified lines
3656 path->leave_spinning = 0;3656 path->leave_spinning = 0;
3657 3657
3658 memcpy(&new_key, &key, sizeof(new_key));3658 memcpy(&new_key, &key, sizeof(new_key));
3659 new_key.objectid = btrfs_ino(inode);3659 new_key.objectid = btrfs_ino(BTRFS_I(inode));
3660 if (off <= key.offset)3660 if (off <= key.offset)
3661 new_key.offset = key.offset + destoff - off;3661 new_key.offset = key.offset + destoff - off;
3662 else3662 else
@@ -3746,7 +3746,7 @@ process_slot: · 83 unmodified lines
3746 fs_info,3746 fs_info,
3747 disko, diskl, 0,3747 disko, diskl, 0,
3748 root->root_key.objectid,3748 root->root_key.objectid,
3749 btrfs_ino(inode),3749 btrfs_ino(BTRFS_I(inode)),
3750 new_key.offset - datao);3750 new_key.offset - datao);
3751 if (ret) {3751 if (ret) {
3752 btrfs_abort_transaction(trans,3752 btrfs_abort_transaction(trans,
@@ -5126,7 +5126,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file, · 1373 unmodified lines
5126 5126
5127 down_write(&fs_info->subvol_sem);5127 down_write(&fs_info->subvol_sem);
5128 5128
5129 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) {5129 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID) {
5130 ret = -EINVAL;5130 ret = -EINVAL;
5131 goto out;5131 goto out;
5132 }5132 }
fs/btrfs/props.c+2−2
@@ -279,7 +279,7 @@ static void inode_prop_iterator(void *ctx, · 278 unmodified lines
279 if (unlikely(ret))279 if (unlikely(ret))
280 btrfs_warn(root->fs_info,280 btrfs_warn(root->fs_info,
281 "error applying prop %s to ino %llu (root %llu): %d",281 "error applying prop %s to ino %llu (root %llu): %d",
282 handler->xattr_name, btrfs_ino(inode),282 handler->xattr_name, btrfs_ino(BTRFS_I(inode)),
283 root->root_key.objectid, ret);283 root->root_key.objectid, ret);
284 else284 else
285 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags);285 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags);
@@ -288,7 +288,7 @@ static void inode_prop_iterator(void *ctx, · 2 unmodified lines
288int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)288int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
289{289{
290 struct btrfs_root *root = BTRFS_I(inode)->root;290 struct btrfs_root *root = BTRFS_I(inode)->root;
291 u64 ino = btrfs_ino(inode);291 u64 ino = btrfs_ino(BTRFS_I(inode));
292 int ret;292 int ret;
293 293
294 ret = iterate_object_props(root, path, ino, inode_prop_iterator, inode);294 ret = iterate_object_props(root, path, ino, inode_prop_iterator, inode);
fs/btrfs/relocation.c+8−8
@@ -1548,9 +1548,9 @@ again: · 1547 unmodified lines
1548 prev = node;1548 prev = node;
1549 entry = rb_entry(node, struct btrfs_inode, rb_node);1549 entry = rb_entry(node, struct btrfs_inode, rb_node);
1550 1550
1551 if (objectid < btrfs_ino(&entry->vfs_inode))1551 if (objectid < btrfs_ino(entry))
1552 node = node->rb_left;1552 node = node->rb_left;
1553 else if (objectid > btrfs_ino(&entry->vfs_inode))1553 else if (objectid > btrfs_ino(entry))
1554 node = node->rb_right;1554 node = node->rb_right;
1555 else1555 else
1556 break;1556 break;
@@ -1558,7 +1558,7 @@ again: · 1 unmodified line
1558 if (!node) {1558 if (!node) {
1559 while (prev) {1559 while (prev) {
1560 entry = rb_entry(prev, struct btrfs_inode, rb_node);1560 entry = rb_entry(prev, struct btrfs_inode, rb_node);
1561 if (objectid <= btrfs_ino(&entry->vfs_inode)) {1561 if (objectid <= btrfs_ino(entry)) {
1562 node = prev;1562 node = prev;
1563 break;1563 break;
1564 }1564 }
@@ -1573,7 +1573,7 @@ again: · 8 unmodified lines
1573 return inode;1573 return inode;
1574 }1574 }
1575 1575
1576 objectid = btrfs_ino(&entry->vfs_inode) + 1;1576 objectid = btrfs_ino(entry) + 1;
1577 if (cond_resched_lock(&root->inode_lock))1577 if (cond_resched_lock(&root->inode_lock))
1578 goto again;1578 goto again;
1579 1579
@@ -1609,7 +1609,7 @@ static int get_new_location(struct inode *reloc_inode, u64 *new_bytenr, · 29 unmodified lines
1609 return -ENOMEM;1609 return -ENOMEM;
1610 1610
1611 bytenr -= BTRFS_I(reloc_inode)->index_cnt;1611 bytenr -= BTRFS_I(reloc_inode)->index_cnt;
1612 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(reloc_inode),1612 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(reloc_inode)),
1613 bytenr, 0);1613 bytenr, 0);
1614 if (ret < 0)1614 if (ret < 0)
1615 goto out;1615 goto out;
@@ -1698,11 +1698,11 @@ int replace_file_extents(struct btrfs_trans_handle *trans, · 82 unmodified lines
1698 if (first) {1698 if (first) {
1699 inode = find_next_inode(root, key.objectid);1699 inode = find_next_inode(root, key.objectid);
1700 first = 0;1700 first = 0;
1701 } else if (inode && btrfs_ino(inode) < key.objectid) {1701 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) {
1702 btrfs_add_delayed_iput(inode);1702 btrfs_add_delayed_iput(inode);
1703 inode = find_next_inode(root, key.objectid);1703 inode = find_next_inode(root, key.objectid);
1704 }1704 }
1705 if (inode && btrfs_ino(inode) == key.objectid) {1705 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) {
1706 end = key.offset +1706 end = key.offset +
1707 btrfs_file_extent_num_bytes(leaf, fi);1707 btrfs_file_extent_num_bytes(leaf, fi);
1708 WARN_ON(!IS_ALIGNED(key.offset,1708 WARN_ON(!IS_ALIGNED(key.offset,
@@ -2088,7 +2088,7 @@ static int invalidate_extent_cache(struct btrfs_root *root, · 379 unmodified lines
2088 inode = find_next_inode(root, objectid);2088 inode = find_next_inode(root, objectid);
2089 if (!inode)2089 if (!inode)
2090 break;2090 break;
2091 ino = btrfs_ino(inode);2091 ino = btrfs_ino(BTRFS_I(inode));
2092 2092
2093 if (ino > max_key->objectid) {2093 if (ino > max_key->objectid) {
2094 iput(inode);2094 iput(inode);
fs/btrfs/transaction.c+2−2
@@ -1504,7 +1504,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, · 1503 unmodified lines
1504 1504
1505 /* check if there is a file/dir which has the same name. */1505 /* check if there is a file/dir which has the same name. */
1506 dir_item = btrfs_lookup_dir_item(NULL, parent_root, path,1506 dir_item = btrfs_lookup_dir_item(NULL, parent_root, path,
1507 btrfs_ino(parent_inode),1507 btrfs_ino(BTRFS_I(parent_inode)),
1508 dentry->d_name.name,1508 dentry->d_name.name,
1509 dentry->d_name.len, 0);1509 dentry->d_name.len, 0);
1510 if (dir_item != NULL && !IS_ERR(dir_item)) {1510 if (dir_item != NULL && !IS_ERR(dir_item)) {
@@ -1598,7 +1598,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, · 87 unmodified lines
1598 */1598 */
1599 ret = btrfs_add_root_ref(trans, fs_info, objectid,1599 ret = btrfs_add_root_ref(trans, fs_info, objectid,
1600 parent_root->root_key.objectid,1600 parent_root->root_key.objectid,
1601 btrfs_ino(parent_inode), index,1601 btrfs_ino(BTRFS_I(parent_inode)), index,
1602 dentry->d_name.name, dentry->d_name.len);1602 dentry->d_name.name, dentry->d_name.len);
1603 if (ret) {1603 if (ret) {
1604 btrfs_abort_transaction(trans, ret);1604 btrfs_abort_transaction(trans, ret);
fs/btrfs/tree-log.c+21−21
@@ -631,7 +631,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, · 630 unmodified lines
631 * file. This must be done before the btrfs_drop_extents run631 * file. This must be done before the btrfs_drop_extents run
632 * so we don't try to drop this extent.632 * so we don't try to drop this extent.
633 */633 */
634 ret = btrfs_lookup_file_extent(trans, root, path, btrfs_ino(inode),634 ret = btrfs_lookup_file_extent(trans, root, path, btrfs_ino(BTRFS_I(inode)),
635 start, 0);635 start, 0);
636 636
637 if (ret == 0 &&637 if (ret == 0 &&
@@ -1148,7 +1148,7 @@ next: · 510 unmodified lines
1148 btrfs_release_path(path);1148 btrfs_release_path(path);
1149 1149
1150 /* look for a conflicting sequence number */1150 /* look for a conflicting sequence number */
1151 di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(dir),1151 di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)),
1152 ref_index, name, namelen, 0);1152 ref_index, name, namelen, 0);
1153 if (di && !IS_ERR(di)) {1153 if (di && !IS_ERR(di)) {
1154 ret = drop_one_dir_item(trans, root, path, dir, di);1154 ret = drop_one_dir_item(trans, root, path, dir, di);
@@ -1158,7 +1158,7 @@ next: · 3 unmodified lines
1158 btrfs_release_path(path);1158 btrfs_release_path(path);
1159 1159
1160 /* look for a conflicing name */1160 /* look for a conflicing name */
1161 di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(dir),1161 di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)),
1162 name, namelen, 0);1162 name, namelen, 0);
1163 if (di && !IS_ERR(di)) {1163 if (di && !IS_ERR(di)) {
1164 ret = drop_one_dir_item(trans, root, path, dir, di);1164 ret = drop_one_dir_item(trans, root, path, dir, di);
@@ -1295,7 +1295,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, · 130 unmodified lines
1295 goto out;1295 goto out;
1296 1296
1297 /* if we already have a perfect match, we're done */1297 /* if we already have a perfect match, we're done */
1298 if (!inode_in_dir(root, path, btrfs_ino(dir), btrfs_ino(inode),1298 if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), btrfs_ino(BTRFS_I(inode)),
1299 ref_index, name, namelen)) {1299 ref_index, name, namelen)) {
1300 /*1300 /*
1301 * look for a conflicting back reference in the1301 * look for a conflicting back reference in the
@@ -1367,7 +1367,7 @@ static int count_inode_extrefs(struct btrfs_root *root, · 65 unmodified lines
1367 unsigned int nlink = 0;1367 unsigned int nlink = 0;
1368 u32 item_size;1368 u32 item_size;
1369 u32 cur_offset = 0;1369 u32 cur_offset = 0;
1370 u64 inode_objectid = btrfs_ino(inode);1370 u64 inode_objectid = btrfs_ino(BTRFS_I(inode));
1371 u64 offset = 0;1371 u64 offset = 0;
1372 unsigned long ptr;1372 unsigned long ptr;
1373 struct btrfs_inode_extref *extref;1373 struct btrfs_inode_extref *extref;
@@ -1412,7 +1412,7 @@ static int count_inode_refs(struct btrfs_root *root, · 38 unmodified lines
1412 unsigned long ptr;1412 unsigned long ptr;
1413 unsigned long ptr_end;1413 unsigned long ptr_end;
1414 int name_len;1414 int name_len;
1415 u64 ino = btrfs_ino(inode);1415 u64 ino = btrfs_ino(BTRFS_I(inode));
1416 1416
1417 key.objectid = ino;1417 key.objectid = ino;
1418 key.type = BTRFS_INODE_REF_KEY;1418 key.type = BTRFS_INODE_REF_KEY;
@@ -1477,7 +1477,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans, · 58 unmodified lines
1477 struct btrfs_path *path;1477 struct btrfs_path *path;
1478 int ret;1478 int ret;
1479 u64 nlink = 0;1479 u64 nlink = 0;
1480 u64 ino = btrfs_ino(inode);1480 u64 ino = btrfs_ino(BTRFS_I(inode));
1481 1481
1482 path = btrfs_alloc_path();1482 path = btrfs_alloc_path();
1483 if (!path)1483 if (!path)
@@ -3092,7 +3092,7 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, · 1608 unmodified lines
3092 int ret;3092 int ret;
3093 int err = 0;3093 int err = 0;
3094 int bytes_del = 0;3094 int bytes_del = 0;
3095 u64 dir_ino = btrfs_ino(dir);3095 u64 dir_ino = btrfs_ino(BTRFS_I(dir));
3096 3096
3097 if (BTRFS_I(dir)->logged_trans < trans->transid)3097 if (BTRFS_I(dir)->logged_trans < trans->transid)
3098 return 0;3098 return 0;
@@ -3208,7 +3208,7 @@ int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans, · 109 unmodified lines
3208 log = root->log_root;3208 log = root->log_root;
3209 mutex_lock(&BTRFS_I(inode)->log_mutex);3209 mutex_lock(&BTRFS_I(inode)->log_mutex);
3210 3210
3211 ret = btrfs_del_inode_ref(trans, log, name, name_len, btrfs_ino(inode),3211 ret = btrfs_del_inode_ref(trans, log, name, name_len, btrfs_ino(BTRFS_I(inode)),
3212 dirid, &index);3212 dirid, &index);
3213 mutex_unlock(&BTRFS_I(inode)->log_mutex);3213 mutex_unlock(&BTRFS_I(inode)->log_mutex);
3214 if (ret == -ENOSPC) {3214 if (ret == -ENOSPC) {
@@ -3275,7 +3275,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, · 60 unmodified lines
3275 int nritems;3275 int nritems;
3276 u64 first_offset = min_offset;3276 u64 first_offset = min_offset;
3277 u64 last_offset = (u64)-1;3277 u64 last_offset = (u64)-1;
3278 u64 ino = btrfs_ino(inode);3278 u64 ino = btrfs_ino(BTRFS_I(inode));
3279 3279
3280 log = root->log_root;3280 log = root->log_root;
3281 3281
@@ -3792,7 +3792,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, · 510 unmodified lines
3792 src_path->slots[0]--;3792 src_path->slots[0]--;
3793 src = src_path->nodes[0];3793 src = src_path->nodes[0];
3794 btrfs_item_key_to_cpu(src, &key, src_path->slots[0]);3794 btrfs_item_key_to_cpu(src, &key, src_path->slots[0]);
3795 if (key.objectid != btrfs_ino(inode) ||3795 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
3796 key.type != BTRFS_EXTENT_DATA_KEY)3796 key.type != BTRFS_EXTENT_DATA_KEY)
3797 goto fill_holes;3797 goto fill_holes;
3798 extent = btrfs_item_ptr(src, src_path->slots[0],3798 extent = btrfs_item_ptr(src, src_path->slots[0],
@@ -3857,7 +3857,7 @@ fill_holes: · 58 unmodified lines
3857 btrfs_item_key_to_cpu(src, &key, i);3857 btrfs_item_key_to_cpu(src, &key, i);
3858 if (!btrfs_comp_cpu_keys(&key, &last_key))3858 if (!btrfs_comp_cpu_keys(&key, &last_key))
3859 done = true;3859 done = true;
3860 if (key.objectid != btrfs_ino(inode) ||3860 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
3861 key.type != BTRFS_EXTENT_DATA_KEY) {3861 key.type != BTRFS_EXTENT_DATA_KEY) {
3862 i++;3862 i++;
3863 continue;3863 continue;
@@ -3880,7 +3880,7 @@ fill_holes: · 16 unmodified lines
3880 }3880 }
3881 offset = *last_extent;3881 offset = *last_extent;
3882 len = key.offset - *last_extent;3882 len = key.offset - *last_extent;
3883 ret = btrfs_insert_file_extent(trans, log, btrfs_ino(inode),3883 ret = btrfs_insert_file_extent(trans, log, btrfs_ino(BTRFS_I(inode)),
3884 offset, 0, 0, len, 0, len, 0,3884 offset, 0, 0, len, 0, len, 0,
3885 0, 0);3885 0, 0);
3886 if (ret)3886 if (ret)
@@ -4091,7 +4091,7 @@ static int log_one_extent(struct btrfs_trans_handle *trans, · 204 unmodified lines
4091 return ret;4091 return ret;
4092 4092
4093 if (!extent_inserted) {4093 if (!extent_inserted) {
4094 key.objectid = btrfs_ino(inode);4094 key.objectid = btrfs_ino(BTRFS_I(inode));
4095 key.type = BTRFS_EXTENT_DATA_KEY;4095 key.type = BTRFS_EXTENT_DATA_KEY;
4096 key.offset = em->start;4096 key.offset = em->start;
4097 4097
@@ -4247,7 +4247,7 @@ static int logged_inode_size(struct btrfs_root *log, struct inode *inode, · 149 unmodified lines
4247 struct btrfs_key key;4247 struct btrfs_key key;
4248 int ret;4248 int ret;
4249 4249
4250 key.objectid = btrfs_ino(inode);4250 key.objectid = btrfs_ino(BTRFS_I(inode));
4251 key.type = BTRFS_INODE_ITEM_KEY;4251 key.type = BTRFS_INODE_ITEM_KEY;
4252 key.offset = 0;4252 key.offset = 0;
4253 4253
@@ -4285,7 +4285,7 @@ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, · 31 unmodified lines
4285{4285{
4286 int ret;4286 int ret;
4287 struct btrfs_key key;4287 struct btrfs_key key;
4288 const u64 ino = btrfs_ino(inode);4288 const u64 ino = btrfs_ino(BTRFS_I(inode));
4289 int ins_nr = 0;4289 int ins_nr = 0;
4290 int start_slot = 0;4290 int start_slot = 0;
4291 4291
@@ -4384,7 +4384,7 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans, · 92 unmodified lines
4384 u64 hole_size;4384 u64 hole_size;
4385 struct extent_buffer *leaf;4385 struct extent_buffer *leaf;
4386 struct btrfs_root *log = root->log_root;4386 struct btrfs_root *log = root->log_root;
4387 const u64 ino = btrfs_ino(inode);4387 const u64 ino = btrfs_ino(BTRFS_I(inode));
4388 const u64 i_size = i_size_read(inode);4388 const u64 i_size = i_size_read(inode);
4389 4389
4390 if (!btrfs_fs_incompat(fs_info, NO_HOLES))4390 if (!btrfs_fs_incompat(fs_info, NO_HOLES))
@@ -4617,7 +4617,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, · 226 unmodified lines
4617 int ins_start_slot = 0;4617 int ins_start_slot = 0;
4618 int ins_nr;4618 int ins_nr;
4619 bool fast_search = false;4619 bool fast_search = false;
4620 u64 ino = btrfs_ino(inode);4620 u64 ino = btrfs_ino(BTRFS_I(inode));
4621 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;4621 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
4622 u64 logged_isize = 0;4622 u64 logged_isize = 0;
4623 bool need_log_inode_item = true;4623 bool need_log_inode_item = true;
@@ -4775,7 +4775,7 @@ again: · 151 unmodified lines
4775 err = ret;4775 err = ret;
4776 goto out_unlock;4776 goto out_unlock;
4777 } else if (ret > 0 && ctx &&4777 } else if (ret > 0 && ctx &&
4778 other_ino != btrfs_ino(ctx->inode)) {4778 other_ino != btrfs_ino(BTRFS_I(ctx->inode))) {
4779 struct btrfs_key inode_key;4779 struct btrfs_key inode_key;
4780 struct inode *other_inode;4780 struct inode *other_inode;
4781 4781
@@ -5178,7 +5178,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, · 396 unmodified lines
5178 btrfs_free_path(path);5178 btrfs_free_path(path);
5179 return -ENOMEM;5179 return -ENOMEM;
5180 }5180 }
5181 dir_elem->ino = btrfs_ino(start_inode);5181 dir_elem->ino = btrfs_ino(BTRFS_I(start_inode));
5182 list_add_tail(&dir_elem->list, &dir_list);5182 list_add_tail(&dir_elem->list, &dir_list);
5183 5183
5184 while (!list_empty(&dir_list)) {5184 while (!list_empty(&dir_list)) {
@@ -5297,7 +5297,7 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, · 112 unmodified lines
5297 struct btrfs_path *path;5297 struct btrfs_path *path;
5298 struct btrfs_key key;5298 struct btrfs_key key;
5299 struct btrfs_root *root = BTRFS_I(inode)->root;5299 struct btrfs_root *root = BTRFS_I(inode)->root;
5300 const u64 ino = btrfs_ino(inode);5300 const u64 ino = btrfs_ino(BTRFS_I(inode));
5301 5301
5302 path = btrfs_alloc_path();5302 path = btrfs_alloc_path();
5303 if (!path)5303 if (!path)
fs/btrfs/xattr.c+5−5
@@ -47,7 +47,7 @@ ssize_t __btrfs_getxattr(struct inode *inode, const char *name, · 46 unmodified lines
47 return -ENOMEM;47 return -ENOMEM;
48 48
49 /* lookup the xattr by name */49 /* lookup the xattr by name */
50 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(inode), name,50 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), name,
51 strlen(name), 0);51 strlen(name), 0);
52 if (!di) {52 if (!di) {
53 ret = -ENODATA;53 ret = -ENODATA;
@@ -108,7 +108,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans, · 54 unmodified lines
108 path->skip_release_on_error = 1;108 path->skip_release_on_error = 1;
109 109
110 if (!value) {110 if (!value) {
111 di = btrfs_lookup_xattr(trans, root, path, btrfs_ino(inode),111 di = btrfs_lookup_xattr(trans, root, path, btrfs_ino(BTRFS_I(inode)),
112 name, name_len, -1);112 name, name_len, -1);
113 if (!di && (flags & XATTR_REPLACE))113 if (!di && (flags & XATTR_REPLACE))
114 ret = -ENODATA;114 ret = -ENODATA;
@@ -128,7 +128,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans, · 13 unmodified lines
128 */128 */
129 if (flags & XATTR_REPLACE) {129 if (flags & XATTR_REPLACE) {
130 ASSERT(inode_is_locked(inode));130 ASSERT(inode_is_locked(inode));
131 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(inode),131 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)),
132 name, name_len, 0);132 name, name_len, 0);
133 if (!di)133 if (!di)
134 ret = -ENODATA;134 ret = -ENODATA;
@@ -140,7 +140,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans, · 5 unmodified lines
140 di = NULL;140 di = NULL;
141 }141 }
142 142
143 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(inode),143 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)),
144 name, name_len, value, size);144 name, name_len, value, size);
145 if (ret == -EOVERFLOW) {145 if (ret == -EOVERFLOW) {
146 /*146 /*
@@ -278,7 +278,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) · 131 unmodified lines
278 * NOTE: we set key.offset = 0; because we want to start with the278 * NOTE: we set key.offset = 0; because we want to start with the
279 * first xattr that we find and walk forward279 * first xattr that we find and walk forward
280 */280 */
281 key.objectid = btrfs_ino(inode);281 key.objectid = btrfs_ino(BTRFS_I(inode));
282 key.type = BTRFS_XATTR_ITEM_KEY;282 key.type = BTRFS_XATTR_ITEM_KEY;
283 key.offset = 0;283 key.offset = 0;
284 284
include/trace/events/btrfs.h+1−1
@@ -184,7 +184,7 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, · 183 unmodified lines
184 184
185TRACE_EVENT_CONDITION(btrfs_get_extent,185TRACE_EVENT_CONDITION(btrfs_get_extent,
186 186
187 TP_PROTO(struct btrfs_root *root, struct inode *inode,187 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
188 struct extent_map *map),188 struct extent_map *map),
189 189
190 TP_ARGS(root, inode, map),190 TP_ARGS(root, inode, map),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t