Lines Matching refs:leafhdr
65 struct xfs_dir3_icleaf_hdr leafhdr;
67 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
69 if (leafhdr.magic == XFS_DIR3_LEAFN_MAGIC) {
73 } else if (leafhdr.magic != XFS_DIR2_LEAFN_MAGIC)
76 return xfs_dir3_leaf_check_int(dp->i_mount, &leafhdr, leaf);
498 struct xfs_dir3_icleaf_hdr leafhdr;
511 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
512 ents = leafhdr.ents;
530 if (leafhdr.count == args->geo->leaf_max_ents) {
531 if (!leafhdr.stale)
533 compact = leafhdr.stale > 1;
537 ASSERT(index == leafhdr.count ||
548 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale,
550 else if (leafhdr.stale) {
554 lfloglow = leafhdr.count;
561 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale,
568 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
570 xfs_dir3_leaf_log_ents(args, &leafhdr, bp, lfloglow, lfloghigh);
604 struct xfs_dir3_icleaf_hdr leafhdr;
606 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, bp->b_addr);
608 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC ||
609 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC ||
610 leafhdr.magic == XFS_DIR2_LEAF1_MAGIC ||
611 leafhdr.magic == XFS_DIR3_LEAF1_MAGIC);
614 *count = leafhdr.count;
615 if (!leafhdr.count)
617 return be32_to_cpu(leafhdr.ents[leafhdr.count - 1].hashval);
646 struct xfs_dir3_icleaf_hdr leafhdr;
652 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
655 ASSERT(leafhdr.count > 0);
676 for (lep = &leafhdr.ents[index];
677 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
796 struct xfs_dir3_icleaf_hdr leafhdr;
802 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
805 if (leafhdr.count <= 0) {
824 for (lep = &leafhdr.ents[index];
825 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
903 ASSERT(index == leafhdr.count || (args->op_flags & XFS_DA_OP_OKNOENT));
1282 struct xfs_dir3_icleaf_hdr leafhdr;
1289 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
1294 lep = &leafhdr.ents[index];
1308 leafhdr.stale++;
1309 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
1313 xfs_dir3_leaf_log_ents(args, &leafhdr, bp, index, index);
1409 (uint)sizeof(leafhdr.ents) * (leafhdr.count - leafhdr.stale)) <
1498 struct xfs_dir3_icleaf_hdr leafhdr;
1509 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
1510 ents = leafhdr.ents;
1513 count = leafhdr.count - leafhdr.stale;
1533 forward = (leafhdr.forw != 0);
1549 forward = leafhdr.forw < leafhdr.back;
1553 blkno = forward ? leafhdr.forw : leafhdr.back;
1566 count = leafhdr.count - leafhdr.stale;
2225 struct xfs_dir3_icleaf_hdr leafhdr;
2234 xfs_dir2_leaf_hdr_from_disk(state->mp, &leafhdr,
2245 be32_to_cpu(leafhdr.ents[blk->index].address)));