Lines Matching refs:irec

56 	xfs_inobt_rec_incore_t	*irec)	/* btree record */  in xfs_inobt_update()  argument
60 rec.inobt.ir_startino = cpu_to_be32(irec->ir_startino); in xfs_inobt_update()
62 rec.inobt.ir_u.sp.ir_holemask = cpu_to_be16(irec->ir_holemask); in xfs_inobt_update()
63 rec.inobt.ir_u.sp.ir_count = irec->ir_count; in xfs_inobt_update()
64 rec.inobt.ir_u.sp.ir_freecount = irec->ir_freecount; in xfs_inobt_update()
67 rec.inobt.ir_u.f.ir_freecount = cpu_to_be32(irec->ir_freecount); in xfs_inobt_update()
69 rec.inobt.ir_free = cpu_to_be64(irec->ir_free); in xfs_inobt_update()
78 struct xfs_inobt_rec_incore *irec) in xfs_inobt_btrec_to_irec() argument
80 irec->ir_startino = be32_to_cpu(rec->inobt.ir_startino); in xfs_inobt_btrec_to_irec()
82 irec->ir_holemask = be16_to_cpu(rec->inobt.ir_u.sp.ir_holemask); in xfs_inobt_btrec_to_irec()
83 irec->ir_count = rec->inobt.ir_u.sp.ir_count; in xfs_inobt_btrec_to_irec()
84 irec->ir_freecount = rec->inobt.ir_u.sp.ir_freecount; in xfs_inobt_btrec_to_irec()
90 irec->ir_holemask = XFS_INOBT_HOLEMASK_FULL; in xfs_inobt_btrec_to_irec()
91 irec->ir_count = XFS_INODES_PER_CHUNK; in xfs_inobt_btrec_to_irec()
92 irec->ir_freecount = in xfs_inobt_btrec_to_irec()
95 irec->ir_free = be64_to_cpu(rec->inobt.ir_free); in xfs_inobt_btrec_to_irec()
102 const struct xfs_inobt_rec_incore *irec) in xfs_inobt_check_irec() argument
107 if (!xfs_verify_agino(cur->bc_ag.pag, irec->ir_startino)) in xfs_inobt_check_irec()
110 irec->ir_startino + XFS_INODES_PER_CHUNK - 1)) in xfs_inobt_check_irec()
112 if (irec->ir_count < XFS_INODES_PER_HOLEMASK_BIT || in xfs_inobt_check_irec()
113 irec->ir_count > XFS_INODES_PER_CHUNK) in xfs_inobt_check_irec()
115 if (irec->ir_freecount > XFS_INODES_PER_CHUNK) in xfs_inobt_check_irec()
119 if (!xfs_inobt_issparse(irec->ir_holemask)) in xfs_inobt_check_irec()
120 realfree = irec->ir_free; in xfs_inobt_check_irec()
122 realfree = irec->ir_free & xfs_inobt_irec_to_allocmask(irec); in xfs_inobt_check_irec()
123 if (hweight64(realfree) != irec->ir_freecount) in xfs_inobt_check_irec()
133 const struct xfs_inobt_rec_incore *irec) in xfs_inobt_complain_bad_rec() argument
143 irec->ir_startino, irec->ir_count, irec->ir_freecount, in xfs_inobt_complain_bad_rec()
144 irec->ir_free, irec->ir_holemask); in xfs_inobt_complain_bad_rec()
154 struct xfs_inobt_rec_incore *irec, in xfs_inobt_get_rec() argument
166 xfs_inobt_btrec_to_irec(mp, rec, irec); in xfs_inobt_get_rec()
167 fa = xfs_inobt_check_irec(cur, irec); in xfs_inobt_get_rec()
169 return xfs_inobt_complain_bad_rec(cur, fa, irec); in xfs_inobt_get_rec()
2658 struct xfs_inobt_rec_incore irec; in xfs_ialloc_count_ondisk() local
2670 error = xfs_inobt_get_rec(cur, &irec, &has_record); in xfs_ialloc_count_ondisk()
2673 if (irec.ir_startino > high) in xfs_ialloc_count_ondisk()
2677 if (irec.ir_startino + i < low) in xfs_ialloc_count_ondisk()
2679 if (irec.ir_startino + i > high) in xfs_ialloc_count_ondisk()
2683 if (!(irec.ir_holemask & (1U << hole_idx))) in xfs_ialloc_count_ondisk()
2737 struct xfs_inobt_rec_incore irec; in xfs_ialloc_count_inodes_rec() local
2741 xfs_inobt_btrec_to_irec(cur->bc_mp, rec, &irec); in xfs_ialloc_count_inodes_rec()
2742 fa = xfs_inobt_check_irec(cur, &irec); in xfs_ialloc_count_inodes_rec()
2744 return xfs_inobt_complain_bad_rec(cur, fa, &irec); in xfs_ialloc_count_inodes_rec()
2746 ci->count += irec.ir_count; in xfs_ialloc_count_inodes_rec()
2747 ci->freecount += irec.ir_freecount; in xfs_ialloc_count_inodes_rec()