Lines Matching refs:leafhdr

68 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leafn_check()  local
70 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
72 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { in xfs_dir3_leafn_check()
76 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leafn_check()
79 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
390 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_add() local
397 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
414 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
415 if (!leafhdr.stale) in xfs_dir2_leafn_add()
417 compact = leafhdr.stale > 1; in xfs_dir2_leafn_add()
421 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
432 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leafn_add()
434 else if (leafhdr.stale) { in xfs_dir2_leafn_add()
438 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
445 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leafn_add()
452 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
491 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lasthash() local
493 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lasthash()
495 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_leafn_lasthash()
496 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); in xfs_dir2_leafn_lasthash()
499 *count = leafhdr.count; in xfs_dir2_leafn_lasthash()
500 if (!leafhdr.count) in xfs_dir2_leafn_lasthash()
504 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leafn_lasthash()
534 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_addname() local
540 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
544 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
566 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
686 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_entry() local
692 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
696 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_entry()
713 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
791 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
1173 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_remove() local
1181 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1201 leafhdr.stale++; in xfs_dir2_leafn_remove()
1202 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1303 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1392 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_toosmall() local
1403 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1407 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1427 forward = (leafhdr.forw != 0); in xfs_dir2_leafn_toosmall()
1443 forward = leafhdr.forw < leafhdr.back; in xfs_dir2_leafn_toosmall()
1447 blkno = forward ? leafhdr.forw : leafhdr.back; in xfs_dir2_leafn_toosmall()
1461 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()