Lines Matching refs:leafhdr
65 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf1_check() local
67 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf1_check()
69 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { in xfs_dir3_leaf1_check()
73 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf1_check()
76 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leaf1_check()
94 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf_check_int() local
104 ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf_check_int()
105 hdr = &leafhdr; in xfs_dir3_leaf_check_int()
395 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_block_to_leaf() local
429 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_block_to_leaf()
430 leafhdr.count = be32_to_cpu(btp->count); in xfs_dir2_block_to_leaf()
431 leafhdr.stale = be32_to_cpu(btp->stale); in xfs_dir2_block_to_leaf()
432 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_block_to_leaf()
440 xfs_dir3_leaf_log_ents(args, lbp, 0, leafhdr.count - 1); in xfs_dir2_block_to_leaf()
484 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_stale() argument
504 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { in xfs_dir3_leaf_find_stale()
515 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_entry() argument
524 if (!leafhdr->stale) { in xfs_dir3_leaf_find_entry()
533 if (index < leafhdr->count) in xfs_dir3_leaf_find_entry()
535 (leafhdr->count - index) * sizeof(*lep)); in xfs_dir3_leaf_find_entry()
541 *lfloghigh = leafhdr->count++; in xfs_dir3_leaf_find_entry()
555 xfs_dir3_leaf_find_stale(leafhdr, ents, index, in xfs_dir3_leaf_find_entry()
562 (highstale == leafhdr->count || in xfs_dir3_leaf_find_entry()
579 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
599 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
638 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_addname() local
659 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_addname()
670 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_addname()
703 if (!leafhdr.stale) in xfs_dir2_leaf_addname()
718 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && in xfs_dir2_leaf_addname()
719 leafhdr.stale > 1) in xfs_dir2_leaf_addname()
726 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { in xfs_dir2_leaf_addname()
774 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leaf_addname()
781 else if (leafhdr.stale) { in xfs_dir2_leaf_addname()
782 lfloglow = leafhdr.count; in xfs_dir2_leaf_addname()
887 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leaf_addname()
900 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_addname()
915 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact() argument
926 if (!leafhdr->stale) in xfs_dir3_leaf_compact()
933 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact()
949 ASSERT(leafhdr->stale == from - to); in xfs_dir3_leaf_compact()
950 leafhdr->count -= leafhdr->stale; in xfs_dir3_leaf_compact()
951 leafhdr->stale = 0; in xfs_dir3_leaf_compact()
953 dp->d_ops->leaf_hdr_to_disk(leaf, leafhdr); in xfs_dir3_leaf_compact()
969 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact_x1() argument
985 ASSERT(leafhdr->stale > 1); in xfs_dir3_leaf_compact_x1()
988 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); in xfs_dir3_leaf_compact_x1()
994 (highstale == leafhdr->count || in xfs_dir3_leaf_compact_x1()
1003 for (from = to = 0; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact_x1()
1038 leafhdr->count -= from - to; in xfs_dir3_leaf_compact_x1()
1039 leafhdr->stale = 1; in xfs_dir3_leaf_compact_x1()
1047 highstale = leafhdr->count; in xfs_dir3_leaf_compact_x1()
1048 *highlogp = leafhdr->count - 1; in xfs_dir3_leaf_compact_x1()
1231 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lookup_int() local
1245 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lookup_int()
1256 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_lookup_int()
1363 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_removename() local
1378 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_removename()
1401 leafhdr.stale++; in xfs_dir2_leaf_removename()
1402 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_removename()
1552 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_search_hash() local
1556 args->dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_search_hash()
1562 for (lep = ents, low = 0, high = leafhdr.count - 1, in xfs_dir2_leaf_search_hash()
1693 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_node_to_leaf() local
1744 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_node_to_leaf()
1746 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_node_to_leaf()
1747 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_node_to_leaf()
1764 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) { in xfs_dir2_node_to_leaf()
1772 if (leafhdr.stale) in xfs_dir2_node_to_leaf()
1773 xfs_dir3_leaf_compact(args, &leafhdr, lbp); in xfs_dir2_node_to_leaf()
1777 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir2_node_to_leaf()
1793 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_node_to_leaf()