• Home
  • Raw
  • Download

Lines Matching refs:leafhdr

66 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leaf1_check()  local
68 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf1_check()
70 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { in xfs_dir3_leaf1_check()
74 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf1_check()
77 return xfs_dir3_leaf_check_int(mp, &leafhdr, leaf); in xfs_dir3_leaf1_check()
189 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leaf_verify() local
193 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leaf_verify()
198 leafhdr.magic != XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_verify()
200 leafhdr.magic != XFS_DIR3_LEAFN_MAGIC)) in xfs_dir3_leaf_verify()
208 if (leafhdr.magic != magic) in xfs_dir3_leaf_verify()
211 return xfs_dir3_leaf_check_int(mp, &leafhdr, leaf); in xfs_dir3_leaf_verify()
429 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_block_to_leaf() local
464 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_block_to_leaf()
465 leafhdr.count = be32_to_cpu(btp->count); in xfs_dir2_block_to_leaf()
466 leafhdr.stale = be32_to_cpu(btp->stale); in xfs_dir2_block_to_leaf()
467 xfs_dir3_leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_block_to_leaf()
475 xfs_dir3_leaf_log_ents(tp, lbp, 0, leafhdr.count - 1); in xfs_dir2_block_to_leaf()
519 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_stale() argument
539 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { in xfs_dir3_leaf_find_stale()
550 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_find_entry() argument
559 if (!leafhdr->stale) { in xfs_dir3_leaf_find_entry()
568 if (index < leafhdr->count) in xfs_dir3_leaf_find_entry()
570 (leafhdr->count - index) * sizeof(*lep)); in xfs_dir3_leaf_find_entry()
576 *lfloghigh = leafhdr->count++; in xfs_dir3_leaf_find_entry()
590 xfs_dir3_leaf_find_stale(leafhdr, ents, index, in xfs_dir3_leaf_find_entry()
597 (highstale == leafhdr->count || in xfs_dir3_leaf_find_entry()
614 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
634 leafhdr->stale--; in xfs_dir3_leaf_find_entry()
674 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_addname() local
696 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_addname()
707 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_addname()
740 if (!leafhdr.stale) in xfs_dir2_leaf_addname()
755 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && in xfs_dir2_leaf_addname()
756 leafhdr.stale > 1) in xfs_dir2_leaf_addname()
763 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { in xfs_dir2_leaf_addname()
811 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leaf_addname()
818 else if (leafhdr.stale) { in xfs_dir2_leaf_addname()
819 lfloglow = leafhdr.count; in xfs_dir2_leaf_addname()
922 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leaf_addname()
934 xfs_dir3_leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_addname()
949 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact() argument
959 if (!leafhdr->stale) in xfs_dir3_leaf_compact()
966 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact()
982 ASSERT(leafhdr->stale == from - to); in xfs_dir3_leaf_compact()
983 leafhdr->count -= leafhdr->stale; in xfs_dir3_leaf_compact()
984 leafhdr->stale = 0; in xfs_dir3_leaf_compact()
986 xfs_dir3_leaf_hdr_to_disk(leaf, leafhdr); in xfs_dir3_leaf_compact()
1002 struct xfs_dir3_icleaf_hdr *leafhdr, in xfs_dir3_leaf_compact_x1() argument
1018 ASSERT(leafhdr->stale > 1); in xfs_dir3_leaf_compact_x1()
1021 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); in xfs_dir3_leaf_compact_x1()
1027 (highstale == leafhdr->count || in xfs_dir3_leaf_compact_x1()
1036 for (from = to = 0; from < leafhdr->count; from++) { in xfs_dir3_leaf_compact_x1()
1071 leafhdr->count -= from - to; in xfs_dir3_leaf_compact_x1()
1072 leafhdr->stale = 1; in xfs_dir3_leaf_compact_x1()
1080 highstale = leafhdr->count; in xfs_dir3_leaf_compact_x1()
1081 *highlogp = leafhdr->count - 1; in xfs_dir3_leaf_compact_x1()
1650 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lookup_int() local
1664 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lookup_int()
1675 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leaf_lookup_int()
1782 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_removename() local
1799 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_removename()
1822 leafhdr.stale++; in xfs_dir2_leaf_removename()
1823 xfs_dir3_leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leaf_removename()
1971 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_search_hash() local
1975 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_search_hash()
1978 if (!leafhdr.count) in xfs_dir2_leaf_search_hash()
1985 for (lep = ents, low = 0, high = leafhdr.count - 1, in xfs_dir2_leaf_search_hash()
2117 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_node_to_leaf() local
2168 xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_node_to_leaf()
2170 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_node_to_leaf()
2171 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_node_to_leaf()
2188 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > mp->m_dirblksize) { in xfs_dir2_node_to_leaf()
2196 if (leafhdr.stale) in xfs_dir2_node_to_leaf()
2197 xfs_dir3_leaf_compact(args, &leafhdr, lbp); in xfs_dir2_node_to_leaf()
2201 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir2_node_to_leaf()
2217 xfs_dir3_leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_node_to_leaf()