Lines Matching refs:irec
94 struct xfs_refcount_irec *irec) in xfs_refcount_btrec_to_irec() argument
96 irec->rc_startblock = be32_to_cpu(rec->refc.rc_startblock); in xfs_refcount_btrec_to_irec()
97 irec->rc_blockcount = be32_to_cpu(rec->refc.rc_blockcount); in xfs_refcount_btrec_to_irec()
98 irec->rc_refcount = be32_to_cpu(rec->refc.rc_refcount); in xfs_refcount_btrec_to_irec()
107 struct xfs_refcount_irec *irec, in xfs_refcount_get_rec() argument
120 xfs_refcount_btrec_to_irec(rec, irec); in xfs_refcount_get_rec()
123 if (irec->rc_blockcount == 0 || irec->rc_blockcount > MAXREFCEXTLEN) in xfs_refcount_get_rec()
127 realstart = irec->rc_startblock; in xfs_refcount_get_rec()
129 if (irec->rc_refcount != 1) in xfs_refcount_get_rec()
132 } else if (irec->rc_refcount < 2) { in xfs_refcount_get_rec()
139 if (realstart > realstart + irec->rc_blockcount) in xfs_refcount_get_rec()
141 if (!xfs_verify_agbno(mp, agno, realstart + irec->rc_blockcount - 1)) in xfs_refcount_get_rec()
144 if (irec->rc_refcount == 0 || irec->rc_refcount > MAXREFCOUNT) in xfs_refcount_get_rec()
147 trace_xfs_refcount_get(cur->bc_mp, cur->bc_ag.agno, irec); in xfs_refcount_get_rec()
155 irec->rc_startblock, irec->rc_blockcount, irec->rc_refcount); in xfs_refcount_get_rec()
167 struct xfs_refcount_irec *irec) in xfs_refcount_update() argument
172 trace_xfs_refcount_update(cur->bc_mp, cur->bc_ag.agno, irec); in xfs_refcount_update()
173 rec.refc.rc_startblock = cpu_to_be32(irec->rc_startblock); in xfs_refcount_update()
174 rec.refc.rc_blockcount = cpu_to_be32(irec->rc_blockcount); in xfs_refcount_update()
175 rec.refc.rc_refcount = cpu_to_be32(irec->rc_refcount); in xfs_refcount_update()
191 struct xfs_refcount_irec *irec, in xfs_refcount_insert() argument
196 trace_xfs_refcount_insert(cur->bc_mp, cur->bc_ag.agno, irec); in xfs_refcount_insert()
197 cur->bc_rec.rc.rc_startblock = irec->rc_startblock; in xfs_refcount_insert()
198 cur->bc_rec.rc.rc_blockcount = irec->rc_blockcount; in xfs_refcount_insert()
199 cur->bc_rec.rc.rc_refcount = irec->rc_refcount; in xfs_refcount_insert()
226 struct xfs_refcount_irec irec; in xfs_refcount_delete() local
230 error = xfs_refcount_get_rec(cur, &irec, &found_rec); in xfs_refcount_delete()
237 trace_xfs_refcount_delete(cur->bc_mp, cur->bc_ag.agno, &irec); in xfs_refcount_delete()
245 error = xfs_refcount_lookup_ge(cur, irec.rc_startblock, &found_rec); in xfs_refcount_delete()