Lines Matching refs:leafhdr

66 	struct xfs_dir3_icleaf_hdr leafhdr;  in xfs_dir3_leafn_check()  local
68 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf); in xfs_dir3_leafn_check()
70 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) { in xfs_dir3_leafn_check()
74 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leafn_check()
77 return xfs_dir3_leaf_check_int(dp->i_mount, &leafhdr, leaf, false); in xfs_dir3_leafn_check()
505 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_add() local
518 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf); in xfs_dir2_leafn_add()
519 ents = leafhdr.ents; in xfs_dir2_leafn_add()
538 if (leafhdr.count == args->geo->leaf_max_ents) { in xfs_dir2_leafn_add()
539 if (!leafhdr.stale) in xfs_dir2_leafn_add()
541 compact = leafhdr.stale > 1; in xfs_dir2_leafn_add()
545 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
556 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, in xfs_dir2_leafn_add()
558 else if (leafhdr.stale) { in xfs_dir2_leafn_add()
562 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
569 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, in xfs_dir2_leafn_add()
576 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr); in xfs_dir2_leafn_add()
578 xfs_dir3_leaf_log_ents(args, &leafhdr, bp, lfloglow, lfloghigh); in xfs_dir2_leafn_add()
612 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leaf_lasthash() local
614 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, bp->b_addr); in xfs_dir2_leaf_lasthash()
616 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
617 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC || in xfs_dir2_leaf_lasthash()
618 leafhdr.magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir2_leaf_lasthash()
619 leafhdr.magic == XFS_DIR3_LEAF1_MAGIC); in xfs_dir2_leaf_lasthash()
622 *count = leafhdr.count; in xfs_dir2_leaf_lasthash()
623 if (!leafhdr.count) in xfs_dir2_leaf_lasthash()
625 return be32_to_cpu(leafhdr.ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash()
654 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_addname() local
660 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
663 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
684 for (lep = &leafhdr.ents[index]; in xfs_dir2_leafn_lookup_for_addname()
685 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
805 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_lookup_for_entry() local
811 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
814 if (leafhdr.count <= 0) { in xfs_dir2_leafn_lookup_for_entry()
834 for (lep = &leafhdr.ents[index]; in xfs_dir2_leafn_lookup_for_entry()
835 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_entry()
913 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT)); in xfs_dir2_leafn_lookup_for_entry()
1292 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_remove() local
1299 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf); in xfs_dir2_leafn_remove()
1304 lep = &leafhdr.ents[index]; in xfs_dir2_leafn_remove()
1318 leafhdr.stale++; in xfs_dir2_leafn_remove()
1319 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr); in xfs_dir2_leafn_remove()
1323 xfs_dir3_leaf_log_ents(args, &leafhdr, bp, index, index); in xfs_dir2_leafn_remove()
1419 (uint)sizeof(leafhdr.ents) * (leafhdr.count - leafhdr.stale)) < in xfs_dir2_leafn_remove()
1508 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_leafn_toosmall() local
1519 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1520 ents = leafhdr.ents; in xfs_dir2_leafn_toosmall()
1523 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
1543 forward = (leafhdr.forw != 0); in xfs_dir2_leafn_toosmall()
1559 forward = leafhdr.forw < leafhdr.back; in xfs_dir2_leafn_toosmall()
1563 blkno = forward ? leafhdr.forw : leafhdr.back; in xfs_dir2_leafn_toosmall()
1577 count = leafhdr.count - leafhdr.stale; in xfs_dir2_leafn_toosmall()
2236 struct xfs_dir3_icleaf_hdr leafhdr; in xfs_dir2_node_replace() local
2245 xfs_dir2_leaf_hdr_from_disk(state->mp, &leafhdr, in xfs_dir2_node_replace()
2256 be32_to_cpu(leafhdr.ents[blk->index].address))); in xfs_dir2_node_replace()