Searched refs:leafhdr (Results 1 - 8 of 8) sorted by relevance

/linux-4.1.27/fs/xfs/libxfs/
H A Dxfs_dir2_leaf.c64 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir3_leaf1_check() local
66 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir3_leaf1_check()
68 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { xfs_dir3_leaf1_check()
72 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) xfs_dir3_leaf1_check()
75 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); xfs_dir3_leaf1_check()
93 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir3_leaf_check_int() local
103 ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir3_leaf_check_int()
104 hdr = &leafhdr; xfs_dir3_leaf_check_int()
390 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_block_to_leaf() local
424 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_block_to_leaf()
425 leafhdr.count = be32_to_cpu(btp->count); xfs_dir2_block_to_leaf()
426 leafhdr.stale = be32_to_cpu(btp->stale); xfs_dir2_block_to_leaf()
427 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_block_to_leaf()
435 xfs_dir3_leaf_log_ents(args, lbp, 0, leafhdr.count - 1); xfs_dir2_block_to_leaf()
479 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_find_stale()
499 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { xfs_dir3_leaf_find_stale()
510 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_find_entry()
519 if (!leafhdr->stale) { xfs_dir3_leaf_find_entry()
528 if (index < leafhdr->count) xfs_dir3_leaf_find_entry()
530 (leafhdr->count - index) * sizeof(*lep)); xfs_dir3_leaf_find_entry()
536 *lfloghigh = leafhdr->count++; xfs_dir3_leaf_find_entry()
550 xfs_dir3_leaf_find_stale(leafhdr, ents, index, xfs_dir3_leaf_find_entry()
557 (highstale == leafhdr->count || xfs_dir3_leaf_find_entry()
574 leafhdr->stale--; xfs_dir3_leaf_find_entry()
594 leafhdr->stale--; xfs_dir3_leaf_find_entry()
633 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_addname() local
654 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_addname()
665 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leaf_addname()
698 if (!leafhdr.stale) xfs_dir2_leaf_addname()
713 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && xfs_dir2_leaf_addname()
714 leafhdr.stale > 1) xfs_dir2_leaf_addname()
721 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { xfs_dir2_leaf_addname()
769 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, xfs_dir2_leaf_addname()
776 else if (leafhdr.stale) { xfs_dir2_leaf_addname()
777 lfloglow = leafhdr.count; xfs_dir2_leaf_addname()
882 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, xfs_dir2_leaf_addname()
895 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leaf_addname()
910 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_compact()
921 if (!leafhdr->stale) xfs_dir3_leaf_compact()
928 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { xfs_dir3_leaf_compact()
944 ASSERT(leafhdr->stale == from - to); xfs_dir3_leaf_compact()
945 leafhdr->count -= leafhdr->stale; xfs_dir3_leaf_compact()
946 leafhdr->stale = 0; xfs_dir3_leaf_compact()
948 dp->d_ops->leaf_hdr_to_disk(leaf, leafhdr); xfs_dir3_leaf_compact()
964 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_compact_x1()
980 ASSERT(leafhdr->stale > 1); xfs_dir3_leaf_compact_x1()
983 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); xfs_dir3_leaf_compact_x1()
989 (highstale == leafhdr->count || xfs_dir3_leaf_compact_x1()
998 for (from = to = 0; from < leafhdr->count; from++) { xfs_dir3_leaf_compact_x1()
1033 leafhdr->count -= from - to; xfs_dir3_leaf_compact_x1()
1034 leafhdr->stale = 1; xfs_dir3_leaf_compact_x1()
1042 highstale = leafhdr->count; xfs_dir3_leaf_compact_x1()
1043 *highlogp = leafhdr->count - 1; xfs_dir3_leaf_compact_x1()
1226 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_lookup_int() local
1240 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_lookup_int()
1251 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leaf_lookup_int()
1358 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_removename() local
1373 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_removename()
1396 leafhdr.stale++; xfs_dir2_leaf_removename()
1397 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leaf_removename()
1547 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_search_hash() local
1551 args->dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_search_hash()
1557 for (lep = ents, low = 0, high = leafhdr.count - 1, xfs_dir2_leaf_search_hash()
1688 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_node_to_leaf() local
1739 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_node_to_leaf()
1741 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || xfs_dir2_node_to_leaf()
1742 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); xfs_dir2_node_to_leaf()
1759 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) { xfs_dir2_node_to_leaf()
1767 if (leafhdr.stale) xfs_dir2_node_to_leaf()
1768 xfs_dir3_leaf_compact(args, &leafhdr, lbp); xfs_dir2_node_to_leaf()
1772 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) xfs_dir2_node_to_leaf()
1788 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_node_to_leaf()
478 xfs_dir3_leaf_find_stale( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int index, int *lowstale, int *highstale) xfs_dir3_leaf_find_stale() argument
509 xfs_dir3_leaf_find_entry( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int index, int compact, int lowstale, int highstale, int *lfloglow, int *lfloghigh) xfs_dir3_leaf_find_entry() argument
908 xfs_dir3_leaf_compact( xfs_da_args_t *args, struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_buf *bp) xfs_dir3_leaf_compact() argument
963 xfs_dir3_leaf_compact_x1( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int *indexp, int *lowstalep, int *highstalep, int *lowlogp, int *highlogp) xfs_dir3_leaf_compact_x1() argument
H A Dxfs_dir2_node.c67 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir3_leafn_check() local
69 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir3_leafn_check()
71 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { xfs_dir3_leafn_check()
75 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) xfs_dir3_leafn_check()
78 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); xfs_dir3_leafn_check()
386 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_add() local
393 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_add()
410 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { xfs_dir2_leafn_add()
411 if (!leafhdr.stale) xfs_dir2_leafn_add()
413 compact = leafhdr.stale > 1; xfs_dir2_leafn_add()
417 ASSERT(index == leafhdr.count || xfs_dir2_leafn_add()
428 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, xfs_dir2_leafn_add()
430 else if (leafhdr.stale) { xfs_dir2_leafn_add()
434 lfloglow = leafhdr.count; xfs_dir2_leafn_add()
441 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, xfs_dir2_leafn_add()
448 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leafn_add()
487 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_lasthash() local
489 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_lasthash()
491 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || xfs_dir2_leafn_lasthash()
492 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); xfs_dir2_leafn_lasthash()
495 *count = leafhdr.count; xfs_dir2_leafn_lasthash()
496 if (!leafhdr.count) xfs_dir2_leafn_lasthash()
500 return be32_to_cpu(ents[leafhdr.count - 1].hashval); xfs_dir2_leafn_lasthash()
530 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_lookup_for_addname() local
536 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_lookup_for_addname()
540 ASSERT(leafhdr.count > 0); xfs_dir2_leafn_lookup_for_addname()
562 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leafn_lookup_for_addname()
682 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_lookup_for_entry() local
688 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_lookup_for_entry()
692 ASSERT(leafhdr.count > 0); xfs_dir2_leafn_lookup_for_entry()
709 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leafn_lookup_for_entry()
787 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); xfs_dir2_leafn_lookup_for_entry()
1169 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_remove() local
1177 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_remove()
1197 leafhdr.stale++; xfs_dir2_leafn_remove()
1198 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leafn_remove()
1299 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < xfs_dir2_leafn_remove()
1388 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leafn_toosmall() local
1399 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leafn_toosmall()
1403 count = leafhdr.count - leafhdr.stale; xfs_dir2_leafn_toosmall()
1423 forward = (leafhdr.forw != 0); xfs_dir2_leafn_toosmall()
1439 forward = leafhdr.forw < leafhdr.back; xfs_dir2_leafn_toosmall()
1443 blkno = forward ? leafhdr.forw : leafhdr.back; xfs_dir2_leafn_toosmall()
1457 count = leafhdr.count - leafhdr.stale; xfs_dir2_leafn_toosmall()
H A Dxfs_dir2_priv.h68 struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_buf *bp);
69 extern void xfs_dir3_leaf_compact_x1(struct xfs_dir3_icleaf_hdr *leafhdr,
86 xfs_dir3_leaf_find_entry(struct xfs_dir3_icleaf_hdr *leafhdr,
H A Dxfs_dir2_block.c922 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_to_block() local
930 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_to_block()
934 ASSERT(leafhdr.magic == XFS_DIR2_LEAF1_MAGIC || xfs_dir2_leaf_to_block()
935 leafhdr.magic == XFS_DIR3_LEAF1_MAGIC); xfs_dir2_leaf_to_block()
972 (uint)sizeof(*lep) * (leafhdr.count - leafhdr.stale); xfs_dir2_leaf_to_block()
1001 btp->count = cpu_to_be32(leafhdr.count - leafhdr.stale); xfs_dir2_leaf_to_block()
1008 for (from = to = 0; from < leafhdr.count; from++) { xfs_dir2_leaf_to_block()
H A Dxfs_da_btree.c554 struct xfs_dir3_icleaf_hdr leafhdr; xfs_da3_root_split() local
558 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_da3_root_split()
561 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || xfs_da3_root_split()
562 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); xfs_da3_root_split()
563 size = (int)((char *)&ents[leafhdr.count] - (char *)leaf); xfs_da3_root_split()
2177 struct xfs_dir3_icleaf_hdr leafhdr; xfs_da3_swap_lastblock() local
2181 dp->d_ops->leaf_hdr_from_disk(&leafhdr, dead_leaf2); xfs_da3_swap_lastblock()
2184 dead_hash = be32_to_cpu(ents[leafhdr.count - 1].hashval); xfs_da3_swap_lastblock()
H A Dxfs_attr_leaf.c833 struct xfs_attr3_icleaf_hdr leafhdr; xfs_attr_shortform_allfit() local
839 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf); xfs_attr_shortform_allfit()
843 for (i = 0; i < leafhdr.count; entry++, i++) { xfs_attr_shortform_allfit()
/linux-4.1.27/fs/xfs/
H A Dxfs_attr_list.c224 struct xfs_attr3_icleaf_hdr leafhdr; xfs_attr_node_list() local
263 &leafhdr, leaf); xfs_attr_node_list()
266 entries[leafhdr.count - 1].hashval)) { xfs_attr_node_list()
347 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf); xfs_attr_node_list()
348 if (context->seen_enough || leafhdr.forw == 0) xfs_attr_node_list()
350 cursor->blkno = leafhdr.forw; xfs_attr_node_list()
/linux-4.1.27/fs/btrfs/
H A Dcheck-integrity.c1000 struct btrfs_leaf *const leafhdr = btrfsic_process_metablock() local
1004 sf->nr = btrfs_stack_header_nritems(&leafhdr->header); btrfsic_process_metablock()
1012 &leafhdr->header), btrfsic_process_metablock()
1014 &leafhdr->header)); btrfsic_process_metablock()
1026 (uintptr_t)(leafhdr->items + sf->i) - btrfsic_process_metablock()
1027 (uintptr_t)leafhdr; btrfsic_process_metablock()

Completed in 191 milliseconds