Home
last modified time | relevance | path

Searched refs:leaf (Results 1 – 25 of 64) sorted by relevance

123

/linux-4.19.296/fs/btrfs/
Dtree-checker.c97 #define CHECK_FE_ALIGNED(fs_info, leaf, slot, fi, name, alignment) \ argument
99 if (!IS_ALIGNED(btrfs_file_extent_##name((leaf), (fi)), (alignment))) \
100 file_extent_err((fs_info), (leaf), (slot), \
102 (#name), btrfs_file_extent_##name((leaf), (fi)), \
104 (!IS_ALIGNED(btrfs_file_extent_##name((leaf), (fi)), (alignment))); \
108 struct extent_buffer *leaf, in check_extent_data_item() argument
113 u32 item_size = btrfs_item_size_nr(leaf, slot); in check_extent_data_item()
116 file_extent_err(fs_info, leaf, slot, in check_extent_data_item()
122 fi = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item); in check_extent_data_item()
124 if (btrfs_file_extent_type(leaf, fi) > BTRFS_FILE_EXTENT_TYPES) { in check_extent_data_item()
[all …]
Ddir-item.c31 struct extent_buffer *leaf; in insert_with_overflow() local
43 leaf = path->nodes[0]; in insert_with_overflow()
45 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
46 BUG_ON(data_size > btrfs_item_size(leaf, item)); in insert_with_overflow()
47 ptr += btrfs_item_size(leaf, item) - data_size; in insert_with_overflow()
66 struct extent_buffer *leaf; in btrfs_insert_xattr_item() local
83 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
85 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_xattr_item()
86 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR); in btrfs_insert_xattr_item()
87 btrfs_set_dir_name_len(leaf, dir_item, name_len); in btrfs_insert_xattr_item()
[all …]
Dfile-item.c39 struct extent_buffer *leaf; in btrfs_insert_file_extent() local
54 leaf = path->nodes[0]; in btrfs_insert_file_extent()
55 item = btrfs_item_ptr(leaf, path->slots[0], in btrfs_insert_file_extent()
57 btrfs_set_file_extent_disk_bytenr(leaf, item, disk_offset); in btrfs_insert_file_extent()
58 btrfs_set_file_extent_disk_num_bytes(leaf, item, disk_num_bytes); in btrfs_insert_file_extent()
59 btrfs_set_file_extent_offset(leaf, item, offset); in btrfs_insert_file_extent()
60 btrfs_set_file_extent_num_bytes(leaf, item, num_bytes); in btrfs_insert_file_extent()
61 btrfs_set_file_extent_ram_bytes(leaf, item, ram_bytes); in btrfs_insert_file_extent()
62 btrfs_set_file_extent_generation(leaf, item, trans->transid); in btrfs_insert_file_extent()
63 btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); in btrfs_insert_file_extent()
[all …]
Dinode-item.c11 int btrfs_find_name_in_backref(struct extent_buffer *leaf, int slot, in btrfs_find_name_in_backref() argument
22 item_size = btrfs_item_size_nr(leaf, slot); in btrfs_find_name_in_backref()
23 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_backref()
26 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref()
31 if (memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) { in btrfs_find_name_in_backref()
40 int btrfs_find_name_in_ext_backref(struct extent_buffer *leaf, int slot, in btrfs_find_name_in_ext_backref() argument
52 item_size = btrfs_item_size_nr(leaf, slot); in btrfs_find_name_in_ext_backref()
53 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_ext_backref()
64 ref_name_len = btrfs_inode_extref_name_len(leaf, extref); in btrfs_find_name_in_ext_backref()
67 btrfs_inode_extref_parent(leaf, extref) == ref_objectid && in btrfs_find_name_in_ext_backref()
[all …]
Dxattr.c29 struct extent_buffer *leaf; in btrfs_getxattr() local
48 leaf = path->nodes[0]; in btrfs_getxattr()
51 ret = btrfs_dir_data_len(leaf, di); in btrfs_getxattr()
56 if (btrfs_dir_data_len(leaf, di) > size) { in btrfs_getxattr()
69 btrfs_dir_name_len(leaf, di)); in btrfs_getxattr()
70 read_extent_buffer(leaf, buffer, data_ptr, in btrfs_getxattr()
71 btrfs_dir_data_len(leaf, di)); in btrfs_getxattr()
72 ret = btrfs_dir_data_len(leaf, di); in btrfs_getxattr()
168 struct extent_buffer *leaf = path->nodes[0]; in do_setxattr() local
169 const u16 old_data_len = btrfs_dir_data_len(leaf, di); in do_setxattr()
[all …]
Droot-tree.c210 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
236 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
237 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
243 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
246 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
353 struct extent_buffer *leaf; in btrfs_del_root_ref() local
370 leaf = path->nodes[0]; in btrfs_del_root_ref()
371 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
374 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref()
375 (btrfs_root_ref_name_len(leaf, ref) != name_len) || in btrfs_del_root_ref()
[all …]
Dfile.c755 struct extent_buffer *leaf; in __btrfs_drop_extents() local
791 leaf = path->nodes[0]; in __btrfs_drop_extents()
792 btrfs_item_key_to_cpu(leaf, &key, path->slots[0] - 1); in __btrfs_drop_extents()
800 leaf = path->nodes[0]; in __btrfs_drop_extents()
801 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in __btrfs_drop_extents()
811 leaf = path->nodes[0]; in __btrfs_drop_extents()
815 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in __btrfs_drop_extents()
828 fi = btrfs_item_ptr(leaf, path->slots[0], in __btrfs_drop_extents()
830 extent_type = btrfs_file_extent_type(leaf, fi); in __btrfs_drop_extents()
834 disk_bytenr = btrfs_file_extent_disk_bytenr(leaf, fi); in __btrfs_drop_extents()
[all …]
Dctree.c3163 struct extent_buffer *leaf; in btrfs_search_slot_for_read() local
3176 leaf = p->nodes[0]; in btrfs_search_slot_for_read()
3179 if (p->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_search_slot_for_read()
3200 leaf = p->nodes[0]; in btrfs_search_slot_for_read()
3201 if (p->slots[0] == btrfs_header_nritems(leaf)) in btrfs_search_slot_for_read()
3658 struct extent_buffer *leaf) in btrfs_leaf_free_space() argument
3660 int nritems = btrfs_header_nritems(leaf); in btrfs_leaf_free_space()
3663 ret = BTRFS_LEAF_DATA_SIZE(fs_info) - leaf_space_used(leaf, 0, nritems); in btrfs_leaf_free_space()
3669 leaf_space_used(leaf, 0, nritems), nritems); in btrfs_leaf_free_space()
4430 struct extent_buffer *leaf; in setup_leaf_for_split() local
[all …]
Dexport.c161 struct extent_buffer *leaf; in btrfs_get_parent() local
193 leaf = path->nodes[0]; in btrfs_get_parent()
195 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_get_parent()
202 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_get_parent()
204 key.objectid = btrfs_root_ref_dirid(leaf, ref); in btrfs_get_parent()
233 struct extent_buffer *leaf; in btrfs_get_name() local
273 leaf = path->nodes[0]; in btrfs_get_name()
276 rref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_get_name()
279 name_len = btrfs_root_ref_name_len(leaf, rref); in btrfs_get_name()
281 iref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_get_name()
[all …]
Dfree-space-tree.c53 struct extent_buffer *leaf; in add_new_free_space_info() local
64 leaf = path->nodes[0]; in add_new_free_space_info()
65 info = btrfs_item_ptr(leaf, path->slots[0], in add_new_free_space_info()
67 btrfs_set_free_space_extent_count(leaf, info, 0); in add_new_free_space_info()
68 btrfs_set_free_space_flags(leaf, info, 0); in add_new_free_space_info()
69 btrfs_mark_buffer_dirty(leaf); in add_new_free_space_info()
187 struct extent_buffer *leaf; in convert_free_space_to_bitmaps() local
217 leaf = path->nodes[0]; in convert_free_space_to_bitmaps()
221 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0] - 1); in convert_free_space_to_bitmaps()
260 leaf = path->nodes[0]; in convert_free_space_to_bitmaps()
[all …]
Dtree-checker.h18 struct extent_buffer *leaf);
25 struct extent_buffer *leaf);
29 struct extent_buffer *leaf,
Dinode.c182 struct extent_buffer *leaf; in insert_inline_extent() local
211 leaf = path->nodes[0]; in insert_inline_extent()
212 ei = btrfs_item_ptr(leaf, path->slots[0], in insert_inline_extent()
214 btrfs_set_file_extent_generation(leaf, ei, trans->transid); in insert_inline_extent()
215 btrfs_set_file_extent_type(leaf, ei, BTRFS_FILE_EXTENT_INLINE); in insert_inline_extent()
216 btrfs_set_file_extent_encryption(leaf, ei, 0); in insert_inline_extent()
217 btrfs_set_file_extent_other_encoding(leaf, ei, 0); in insert_inline_extent()
218 btrfs_set_file_extent_ram_bytes(leaf, ei, size); in insert_inline_extent()
230 write_extent_buffer(leaf, kaddr, ptr, cur_size); in insert_inline_extent()
237 btrfs_set_file_extent_compression(leaf, ei, in insert_inline_extent()
[all …]
Dprops.c163 struct extent_buffer *leaf; in iterate_object_props() local
169 leaf = path->nodes[0]; in iterate_object_props()
171 if (slot >= btrfs_header_nritems(leaf)) { in iterate_object_props()
180 btrfs_item_key_to_cpu(leaf, &key, slot); in iterate_object_props()
190 di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item); in iterate_object_props()
192 total_len = btrfs_item_size_nr(leaf, slot); in iterate_object_props()
195 u32 name_len = btrfs_dir_name_len(leaf, di); in iterate_object_props()
196 u32 data_len = btrfs_dir_data_len(leaf, di); in iterate_object_props()
205 memcmp_extent_buffer(leaf, XATTR_BTRFS_PREFIX, in iterate_object_props()
219 read_extent_buffer(leaf, name_buf, name_ptr, name_len); in iterate_object_props()
[all …]
Dvolumes.c1549 struct extent_buffer *leaf = NULL; in btrfs_free_dev_extent() local
1566 leaf = path->nodes[0]; in btrfs_free_dev_extent()
1567 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent()
1568 extent = btrfs_item_ptr(leaf, path->slots[0], in btrfs_free_dev_extent()
1571 btrfs_dev_extent_length(leaf, extent) < start); in btrfs_free_dev_extent()
1576 leaf = path->nodes[0]; in btrfs_free_dev_extent()
1577 extent = btrfs_item_ptr(leaf, path->slots[0], in btrfs_free_dev_extent()
1584 *dev_extent_len = btrfs_dev_extent_length(leaf, extent); in btrfs_free_dev_extent()
1607 struct extent_buffer *leaf; in btrfs_alloc_dev_extent() local
1624 leaf = path->nodes[0]; in btrfs_alloc_dev_extent()
[all …]
Dtree-log.c632 struct extent_buffer *leaf; in replay_one_extent() local
634 leaf = path->nodes[0]; in replay_one_extent()
635 existing = btrfs_item_ptr(leaf, path->slots[0], in replay_one_extent()
640 read_extent_buffer(leaf, &cmp2, (unsigned long)existing, in replay_one_extent()
846 struct extent_buffer *leaf; in drop_one_dir_item() local
850 leaf = path->nodes[0]; in drop_one_dir_item()
852 btrfs_dir_item_key_to_cpu(leaf, di, &location); in drop_one_dir_item()
853 name_len = btrfs_dir_name_len(leaf, di); in drop_one_dir_item()
858 read_extent_buffer(leaf, name, (unsigned long)(di + 1), name_len); in drop_one_dir_item()
1007 struct extent_buffer *leaf; in __add_inode_ref() local
[all …]
Dextent-tree.c60 struct extent_buffer *leaf,
385 struct extent_buffer *leaf; in load_extent_tree_free() local
427 leaf = path->nodes[0]; in load_extent_tree_free()
428 nritems = btrfs_header_nritems(leaf); in load_extent_tree_free()
437 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in load_extent_tree_free()
461 leaf = path->nodes[0]; in load_extent_tree_free()
462 nritems = btrfs_header_nritems(leaf); in load_extent_tree_free()
813 struct extent_buffer *leaf; in btrfs_lookup_extent_info() local
863 leaf = path->nodes[0]; in btrfs_lookup_extent_info()
864 item_size = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_lookup_extent_info()
[all …]
Dref-verify.c395 struct extent_buffer *leaf, in add_extent_data_ref() argument
402 u64 ref_root = btrfs_extent_data_ref_root(leaf, dref); in add_extent_data_ref()
403 u64 owner = btrfs_extent_data_ref_objectid(leaf, dref); in add_extent_data_ref()
404 u64 offset = btrfs_extent_data_ref_offset(leaf, dref); in add_extent_data_ref()
405 u32 num_refs = btrfs_extent_data_ref_count(leaf, dref); in add_extent_data_ref()
448 struct extent_buffer *leaf = path->nodes[0]; in process_extent_item() local
449 u32 item_size = btrfs_item_size_nr(leaf, slot); in process_extent_item()
454 ei = btrfs_item_ptr(leaf, slot, struct btrfs_extent_item); in process_extent_item()
455 flags = btrfs_extent_flags(leaf, ei); in process_extent_item()
462 *tree_block_level = btrfs_tree_block_level(leaf, info); in process_extent_item()
[all …]
/linux-4.19.296/fs/xfs/libxfs/
Dxfs_iext_tree.c146 return &cur->leaf->recs[cur->pos]; in cur_rec()
152 if (!cur->leaf) in xfs_iext_valid()
206 cur->leaf = xfs_iext_find_first_leaf(ifp); in xfs_iext_first()
216 cur->leaf = xfs_iext_find_last_leaf(ifp); in xfs_iext_last()
217 if (!cur->leaf) { in xfs_iext_last()
223 if (xfs_iext_rec_is_empty(&cur->leaf->recs[i])) in xfs_iext_last()
234 if (!cur->leaf) { in xfs_iext_next()
245 cur->leaf->next) { in xfs_iext_next()
246 cur->leaf = cur->leaf->next; in xfs_iext_next()
256 if (!cur->leaf) { in xfs_iext_prev()
[all …]
Dxfs_dir2_leaf.c46 struct xfs_dir2_leaf *leaf = bp->b_addr; in xfs_dir3_leaf1_check() local
49 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf1_check()
58 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leaf1_check()
85 struct xfs_dir2_leaf *leaf) in xfs_dir3_leaf_check_int() argument
102 ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf_check_int()
106 ents = ops->leaf_ents_p(leaf); in xfs_dir3_leaf_check_int()
107 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xfs_dir3_leaf_check_int()
149 struct xfs_dir2_leaf *leaf = bp->b_addr; in xfs_dir3_leaf_verify() local
169 if (leaf->hdr.info.magic != cpu_to_be16(magic)) in xfs_dir3_leaf_verify()
173 return xfs_dir3_leaf_check_int(mp, NULL, NULL, leaf); in xfs_dir3_leaf_verify()
[all …]
Dxfs_attr_leaf.c76 STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index);
244 struct xfs_attr_leafblock *leaf = bp->b_addr; in xfs_attr3_leaf_verify() local
249 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf); in xfs_attr3_leaf_verify()
281 if (ichdr.firstused < xfs_attr3_leaf_hdr_size(leaf)) in xfs_attr3_leaf_verify()
871 struct xfs_attr_leafblock *leaf; in xfs_attr_shortform_allfit() local
879 leaf = bp->b_addr; in xfs_attr_shortform_allfit()
880 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf); in xfs_attr_shortform_allfit()
881 entry = xfs_attr3_leaf_entryp(leaf); in xfs_attr_shortform_allfit()
889 name_loc = xfs_attr3_leaf_name_local(leaf, i); in xfs_attr_shortform_allfit()
990 struct xfs_attr_leafblock *leaf; in xfs_attr3_leaf_to_shortform() local
[all …]
Dxfs_dir2_node.c49 struct xfs_dir2_leaf *leaf = bp->b_addr; in xfs_dir3_leafn_check() local
52 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
61 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
350 xfs_dir2_leaf_t *leaf; /* leaf structure */ in xfs_dir2_leaf_to_node() local
378 leaf = lbp->b_addr; in xfs_dir2_leaf_to_node()
379 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf); in xfs_dir2_leaf_to_node()
412 if (leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC)) in xfs_dir2_leaf_to_node()
413 leaf->hdr.info.magic = cpu_to_be16(XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leaf_to_node()
415 leaf->hdr.info.magic = cpu_to_be16(XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_leaf_to_node()
436 xfs_dir2_leaf_t *leaf; /* leaf structure */ in xfs_dir2_leafn_add() local
[all …]
/linux-4.19.296/fs/xfs/scrub/
Dattr.c191 struct xfs_attr_leafblock *leaf, in xchk_xattr_entry() argument
223 lentry = xfs_attr3_leaf_name_local(leaf, idx); in xchk_xattr_entry()
230 rentry = xfs_attr3_leaf_name_remote(leaf, idx); in xchk_xattr_entry()
256 struct xfs_attr_leafblock *leaf = bp->b_addr; in xchk_xattr_block() local
274 struct xfs_attr3_leafblock *leaf = bp->b_addr; in xchk_xattr_block() local
276 if (leaf->hdr.pad1 != 0 || leaf->hdr.pad2 != 0 || in xchk_xattr_block()
277 leaf->hdr.info.hdr.pad != 0) in xchk_xattr_block()
280 if (leaf->hdr.pad1 != 0 || leaf->hdr.info.pad != 0) in xchk_xattr_block()
285 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf); in xchk_xattr_block()
286 hdrsize = xfs_attr3_leaf_hdr_size(leaf); in xchk_xattr_block()
[all …]
/linux-4.19.296/fs/gfs2/
Ddir.c821 struct gfs2_leaf *leaf; in gfs2_dirent_search() local
839 leaf = (struct gfs2_leaf *)bh->b_data; in gfs2_dirent_search()
840 ln = be64_to_cpu(leaf->lf_next); in gfs2_dirent_search()
872 struct gfs2_leaf *leaf; in new_leaf() local
886 leaf = (struct gfs2_leaf *)bh->b_data; in new_leaf()
887 leaf->lf_depth = cpu_to_be16(depth); in new_leaf()
888 leaf->lf_entries = 0; in new_leaf()
889 leaf->lf_dirent_format = cpu_to_be32(GFS2_FORMAT_DE); in new_leaf()
890 leaf->lf_next = 0; in new_leaf()
891 leaf->lf_inode = cpu_to_be64(ip->i_no_addr); in new_leaf()
[all …]
/linux-4.19.296/fs/btrfs/tests/
Dqgroup-tests.c22 struct extent_buffer *leaf; in insert_normal_tree_ref() local
47 leaf = path->nodes[0]; in insert_normal_tree_ref()
48 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); in insert_normal_tree_ref()
49 btrfs_set_extent_refs(leaf, item, 1); in insert_normal_tree_ref()
50 btrfs_set_extent_generation(leaf, item, 1); in insert_normal_tree_ref()
51 btrfs_set_extent_flags(leaf, item, BTRFS_EXTENT_FLAG_TREE_BLOCK); in insert_normal_tree_ref()
53 btrfs_set_tree_block_level(leaf, block_info, 0); in insert_normal_tree_ref()
56 btrfs_set_extent_inline_ref_type(leaf, iref, in insert_normal_tree_ref()
58 btrfs_set_extent_inline_ref_offset(leaf, iref, parent); in insert_normal_tree_ref()
60 btrfs_set_extent_inline_ref_type(leaf, iref, BTRFS_TREE_BLOCK_REF_KEY); in insert_normal_tree_ref()
[all …]
/linux-4.19.296/fs/xfs/
Dxfs_attr_list.c287 struct xfs_attr_leafblock *leaf; in xfs_attr_node_list() local
323 leaf = bp->b_addr; in xfs_attr_node_list()
325 &leafhdr, leaf); in xfs_attr_node_list()
326 entries = xfs_attr3_leaf_entryp(leaf); in xfs_attr_node_list()
365 leaf = bp->b_addr; in xfs_attr_node_list()
367 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf); in xfs_attr_node_list()
389 struct xfs_attr_leafblock *leaf; in xfs_attr3_leaf_list_int() local
398 leaf = bp->b_addr; in xfs_attr3_leaf_list_int()
399 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf); in xfs_attr3_leaf_list_int()
400 entries = xfs_attr3_leaf_entryp(leaf); in xfs_attr3_leaf_list_int()
[all …]

123