Lines Matching refs:leafhdr
47 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf1_check() local
49 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf1_check()
51 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { in xfs_dir3_leaf1_check()
55 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf1_check()
58 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leaf1_check()
92 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf_check_int() local
102 ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf_check_int()
103 hdr = &leafhdr; in xfs_dir3_leaf_check_int()
411 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_block_to_leaf() local
445 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_block_to_leaf()
446 leafhdr.count = be32_to_cpu(btp->count); in xfs_dir2_block_to_leaf()
447 leafhdr.stale = be32_to_cpu(btp->stale); in xfs_dir2_block_to_leaf()
448 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_block_to_leaf()
456 xfs_dir3_leaf_log_ents(args, lbp, 0, leafhdr.count - 1); in xfs_dir2_block_to_leaf()
500 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_stale() argument
520 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { in xfs_dir3_leaf_find_stale()
531 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_entry() argument
540 if (!leafhdr->stale) { in xfs_dir3_leaf_find_entry()
549 if (index < leafhdr->count) in xfs_dir3_leaf_find_entry()
551 (leafhdr->count - index) * sizeof(*lep)); in xfs_dir3_leaf_find_entry()
557 *lfloghigh = leafhdr->count++; in xfs_dir3_leaf_find_entry()
571 xfs_dir3_leaf_find_stale(leafhdr, ents, index, in xfs_dir3_leaf_find_entry()
578 (highstale == leafhdr->count || in xfs_dir3_leaf_find_entry()
595 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
615 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
654 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_addname() local
675 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_addname()
686 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_addname()
719 if (!leafhdr.stale) in xfs_dir2_leaf_addname()
734 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && in xfs_dir2_leaf_addname()
735 leafhdr.stale > 1) in xfs_dir2_leaf_addname()
742 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { in xfs_dir2_leaf_addname()
790 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leaf_addname()
797 else if (leafhdr.stale) { in xfs_dir2_leaf_addname()
798 lfloglow = leafhdr.count; in xfs_dir2_leaf_addname()
906 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leaf_addname()
919 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_addname()
934 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact() argument
945 if (!leafhdr->stale) in xfs_dir3_leaf_compact()
952 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact()
968 ASSERT(leafhdr->stale == from - to); in xfs_dir3_leaf_compact()
969 leafhdr->count -= leafhdr->stale; in xfs_dir3_leaf_compact()
970 leafhdr->stale = 0; in xfs_dir3_leaf_compact()
972 dp->d_ops->leaf_hdr_to_disk(leaf, leafhdr); in xfs_dir3_leaf_compact()
988 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact_x1() argument
1004 ASSERT(leafhdr->stale > 1); in xfs_dir3_leaf_compact_x1()
1007 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); in xfs_dir3_leaf_compact_x1()
1013 (highstale == leafhdr->count || in xfs_dir3_leaf_compact_x1()
1022 for (from = to = 0; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact_x1()
1057 leafhdr->count -= from - to; in xfs_dir3_leaf_compact_x1()
1058 leafhdr->stale = 1; in xfs_dir3_leaf_compact_x1()
1066 highstale = leafhdr->count; in xfs_dir3_leaf_compact_x1()
1067 *highlogp = leafhdr->count - 1; in xfs_dir3_leaf_compact_x1()
1250 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lookup_int() local
1264 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lookup_int()
1275 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_lookup_int()
1382 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_removename() local
1397 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_removename()
1421 leafhdr.stale++; in xfs_dir2_leaf_removename()
1422 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_removename()
1572 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_search_hash() local
1576 args->dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_search_hash()
1582 for (lep = ents, low = 0, high = leafhdr.count - 1, in xfs_dir2_leaf_search_hash()
1713 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_node_to_leaf() local
1764 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_node_to_leaf()
1766 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_node_to_leaf()
1767 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_node_to_leaf()
1784 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) { in xfs_dir2_node_to_leaf()
1792 if (leafhdr.stale) in xfs_dir2_node_to_leaf()
1793 xfs_dir3_leaf_compact(args, &leafhdr, lbp); in xfs_dir2_node_to_leaf()
1797 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir2_node_to_leaf()
1813 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_node_to_leaf()