Lines Matching refs:leafhdr

46 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leafn_check()  local
48 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
50 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { in xfs_dir3_leafn_check()
54 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leafn_check()
57 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
428 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_add() local
441 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
458 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
459 if (!leafhdr.stale) in xfs_dir2_leafn_add()
461 compact = leafhdr.stale > 1; in xfs_dir2_leafn_add()
465 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
476 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leafn_add()
478 else if (leafhdr.stale) { in xfs_dir2_leafn_add()
482 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
489 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leafn_add()
496 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
535 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lasthash() local
537 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leaf_lasthash()
539 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
540 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
541 leafhdr.magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir2_leaf_lasthash()
542 leafhdr.magic == XFS_DIR3_LEAF1_MAGIC); in xfs_dir2_leaf_lasthash()
545 *count = leafhdr.count; in xfs_dir2_leaf_lasthash()
546 if (!leafhdr.count) in xfs_dir2_leaf_lasthash()
550 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash()
580 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_addname() local
586 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
590 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
612 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
732 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_entry() local
738 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
742 if (leafhdr.count <= 0) in xfs_dir2_leafn_lookup_for_entry()
760 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
838 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
1217 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_remove() local
1225 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1245 leafhdr.stale++; in xfs_dir2_leafn_remove()
1246 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1347 (uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1436 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_toosmall() local
1447 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1451 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1471 forward = (leafhdr.forw != 0); in xfs_dir2_leafn_toosmall()
1487 forward = leafhdr.forw < leafhdr.back; in xfs_dir2_leafn_toosmall()
1491 blkno = forward ? leafhdr.forw : leafhdr.back; in xfs_dir2_leafn_toosmall()
1505 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()