Lines Matching refs:leafhdr

67 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leafn_check()  local
69 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
71 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { in xfs_dir3_leafn_check()
75 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leafn_check()
78 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
386 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_add() local
393 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
410 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
411 if (!leafhdr.stale) in xfs_dir2_leafn_add()
413 compact = leafhdr.stale > 1; in xfs_dir2_leafn_add()
417 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
428 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leafn_add()
430 else if (leafhdr.stale) { in xfs_dir2_leafn_add()
434 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
441 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leafn_add()
448 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
487 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lasthash() local
489 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lasthash()
491 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_leafn_lasthash()
492 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_leafn_lasthash()
495 *count = leafhdr.count; in xfs_dir2_leafn_lasthash()
496 if (!leafhdr.count) in xfs_dir2_leafn_lasthash()
500 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leafn_lasthash()
530 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_addname() local
536 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
540 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
562 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
682 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_entry() local
688 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
692 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_entry()
709 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
787 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
1169 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_remove() local
1177 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1197 leafhdr.stale++; in xfs_dir2_leafn_remove()
1198 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1299 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1388 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_toosmall() local
1399 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1403 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1423 forward = (leafhdr.forw != 0); in xfs_dir2_leafn_toosmall()
1439 forward = leafhdr.forw < leafhdr.back; in xfs_dir2_leafn_toosmall()
1443 blkno = forward ? leafhdr.forw : leafhdr.back; in xfs_dir2_leafn_toosmall()
1457 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()