Lines Matching refs:leafhdr

44 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leaf1_check()  local
46 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf1_check()
48 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { in xfs_dir3_leaf1_check()
52 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf1_check()
55 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leaf1_check()
89 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf_check_int() local
99 ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf_check_int()
100 hdr = &leafhdr; in xfs_dir3_leaf_check_int()
350 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_block_to_leaf() local
384 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_block_to_leaf()
385 leafhdr.count = be32_to_cpu(btp->count); in xfs_dir2_block_to_leaf()
386 leafhdr.stale = be32_to_cpu(btp->stale); in xfs_dir2_block_to_leaf()
387 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_block_to_leaf()
395 xfs_dir3_leaf_log_ents(args, lbp, 0, leafhdr.count - 1); in xfs_dir2_block_to_leaf()
439 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_stale() argument
459 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { in xfs_dir3_leaf_find_stale()
470 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_entry() argument
479 if (!leafhdr->stale) { in xfs_dir3_leaf_find_entry()
488 if (index < leafhdr->count) in xfs_dir3_leaf_find_entry()
490 (leafhdr->count - index) * sizeof(*lep)); in xfs_dir3_leaf_find_entry()
496 *lfloghigh = leafhdr->count++; in xfs_dir3_leaf_find_entry()
510 xfs_dir3_leaf_find_stale(leafhdr, ents, index, in xfs_dir3_leaf_find_entry()
517 (highstale == leafhdr->count || in xfs_dir3_leaf_find_entry()
534 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
554 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
565 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_addname() local
611 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_addname()
622 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_addname()
655 if (!leafhdr.stale) in xfs_dir2_leaf_addname()
670 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && in xfs_dir2_leaf_addname()
671 leafhdr.stale > 1) in xfs_dir2_leaf_addname()
678 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { in xfs_dir2_leaf_addname()
726 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leaf_addname()
733 else if (leafhdr.stale) { in xfs_dir2_leaf_addname()
734 lfloglow = leafhdr.count; in xfs_dir2_leaf_addname()
842 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leaf_addname()
855 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_addname()
870 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact() argument
881 if (!leafhdr->stale) in xfs_dir3_leaf_compact()
888 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact()
904 ASSERT(leafhdr->stale == from - to); in xfs_dir3_leaf_compact()
905 leafhdr->count -= leafhdr->stale; in xfs_dir3_leaf_compact()
906 leafhdr->stale = 0; in xfs_dir3_leaf_compact()
908 dp->d_ops->leaf_hdr_to_disk(leaf, leafhdr); in xfs_dir3_leaf_compact()
924 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact_x1() argument
940 ASSERT(leafhdr->stale > 1); in xfs_dir3_leaf_compact_x1()
943 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); in xfs_dir3_leaf_compact_x1()
949 (highstale == leafhdr->count || in xfs_dir3_leaf_compact_x1()
958 for (from = to = 0; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact_x1()
993 leafhdr->count -= from - to; in xfs_dir3_leaf_compact_x1()
994 leafhdr->stale = 1; in xfs_dir3_leaf_compact_x1()
1002 highstale = leafhdr->count; in xfs_dir3_leaf_compact_x1()
1003 *highlogp = leafhdr->count - 1; in xfs_dir3_leaf_compact_x1()
1186 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lookup_int() local
1200 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lookup_int()
1211 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_lookup_int()
1318 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_removename() local
1333 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_removename()
1357 leafhdr.stale++; in xfs_dir2_leaf_removename()
1358 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_removename()
1508 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_search_hash() local
1512 args->dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_search_hash()
1518 for (lep = ents, low = 0, high = leafhdr.count - 1, in xfs_dir2_leaf_search_hash()
1649 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_node_to_leaf() local
1700 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_node_to_leaf()
1702 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_node_to_leaf()
1703 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_node_to_leaf()
1720 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) { in xfs_dir2_node_to_leaf()
1728 if (leafhdr.stale) in xfs_dir2_node_to_leaf()
1729 xfs_dir3_leaf_compact(args, &leafhdr, lbp); in xfs_dir2_node_to_leaf()
1733 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir2_node_to_leaf()
1749 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_node_to_leaf()