Lines Matching refs:leafhdr
50 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir3_leafn_check() local
52 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
54 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { in xfs_dir3_leafn_check()
58 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leafn_check()
61 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
440 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_add() local
447 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
464 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
465 if (!leafhdr.stale) in xfs_dir2_leafn_add()
467 compact = leafhdr.stale > 1; in xfs_dir2_leafn_add()
471 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
482 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leafn_add()
484 else if (leafhdr.stale) { in xfs_dir2_leafn_add()
488 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
495 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leafn_add()
502 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
541 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lasthash() local
543 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lasthash()
545 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
546 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
547 leafhdr.magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir2_leaf_lasthash()
548 leafhdr.magic == XFS_DIR3_LEAF1_MAGIC); in xfs_dir2_leaf_lasthash()
551 *count = leafhdr.count; in xfs_dir2_leaf_lasthash()
552 if (!leafhdr.count) in xfs_dir2_leaf_lasthash()
556 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash()
586 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_addname() local
592 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
596 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
618 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
738 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_entry() local
744 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
748 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_entry()
765 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
843 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
1222 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_remove() local
1230 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1250 leafhdr.stale++; in xfs_dir2_leafn_remove()
1251 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1352 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1441 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_toosmall() local
1452 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1456 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1476 forward = (leafhdr.forw != 0); in xfs_dir2_leafn_toosmall()
1492 forward = leafhdr.forw < leafhdr.back; in xfs_dir2_leafn_toosmall()
1496 blkno = forward ? leafhdr.forw : leafhdr.back; in xfs_dir2_leafn_toosmall()
1510 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()