Lines Matching refs:rec
86 union xfs_btree_rec rec; in xfs_inobt_update() local
88 rec.inobt.ir_startino = cpu_to_be32(irec->ir_startino); in xfs_inobt_update()
90 rec.inobt.ir_u.sp.ir_holemask = cpu_to_be16(irec->ir_holemask); in xfs_inobt_update()
91 rec.inobt.ir_u.sp.ir_count = irec->ir_count; in xfs_inobt_update()
92 rec.inobt.ir_u.sp.ir_freecount = irec->ir_freecount; in xfs_inobt_update()
95 rec.inobt.ir_u.f.ir_freecount = cpu_to_be32(irec->ir_freecount); in xfs_inobt_update()
97 rec.inobt.ir_free = cpu_to_be64(irec->ir_free); in xfs_inobt_update()
98 return xfs_btree_update(cur, &rec); in xfs_inobt_update()
105 union xfs_btree_rec *rec, in xfs_inobt_btrec_to_irec() argument
108 irec->ir_startino = be32_to_cpu(rec->inobt.ir_startino); in xfs_inobt_btrec_to_irec()
110 irec->ir_holemask = be16_to_cpu(rec->inobt.ir_u.sp.ir_holemask); in xfs_inobt_btrec_to_irec()
111 irec->ir_count = rec->inobt.ir_u.sp.ir_count; in xfs_inobt_btrec_to_irec()
112 irec->ir_freecount = rec->inobt.ir_u.sp.ir_freecount; in xfs_inobt_btrec_to_irec()
121 be32_to_cpu(rec->inobt.ir_u.f.ir_freecount); in xfs_inobt_btrec_to_irec()
123 irec->ir_free = be64_to_cpu(rec->inobt.ir_free); in xfs_inobt_btrec_to_irec()
135 union xfs_btree_rec *rec; in xfs_inobt_get_rec() local
138 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_inobt_get_rec()
142 xfs_inobt_btrec_to_irec(cur->bc_mp, rec, irec); in xfs_inobt_get_rec()
223 xfs_inobt_rec_incore_t rec; in xfs_check_agi_freecount() local
233 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_check_agi_freecount()
238 freecount += rec.ir_freecount; in xfs_check_agi_freecount()
532 struct xfs_inobt_rec_incore rec; in xfs_inobt_insert_sprec() local
557 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_inobt_insert_sprec()
562 rec.ir_startino == nrec->ir_startino, in xfs_inobt_insert_sprec()
569 XFS_WANT_CORRUPTED_GOTO(mp, __xfs_inobt_can_merge(nrec, &rec), in xfs_inobt_insert_sprec()
572 trace_xfs_irec_merge_pre(mp, agno, rec.ir_startino, in xfs_inobt_insert_sprec()
573 rec.ir_holemask, nrec->ir_startino, in xfs_inobt_insert_sprec()
577 __xfs_inobt_rec_merge(nrec, &rec); in xfs_inobt_insert_sprec()
618 struct xfs_inobt_rec_incore rec; in xfs_ialloc_ag_alloc() local
818 rec.ir_startino = newino; in xfs_ialloc_ag_alloc()
819 rec.ir_holemask = ~allocmask; in xfs_ialloc_ag_alloc()
820 rec.ir_count = newlen; in xfs_ialloc_ag_alloc()
821 rec.ir_freecount = newlen; in xfs_ialloc_ag_alloc()
822 rec.ir_free = XFS_INOBT_ALL_FREE; in xfs_ialloc_ag_alloc()
830 &rec, true); in xfs_ialloc_ag_alloc()
835 rec.ir_startino), in xfs_ialloc_ag_alloc()
836 rec.ir_holemask, rec.ir_count); in xfs_ialloc_ag_alloc()
855 XFS_BTNUM_FINO, &rec, in xfs_ialloc_ag_alloc()
1042 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_next_rec() argument
1058 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_next_rec()
1071 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_get_rec() argument
1082 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_get_rec()
1098 struct xfs_inobt_rec_incore *rec) in xfs_inobt_first_free_inode() argument
1103 if (!xfs_inobt_issparse(rec->ir_holemask)) in xfs_inobt_first_free_inode()
1104 return xfs_lowbit64(rec->ir_free); in xfs_inobt_first_free_inode()
1106 realfree = xfs_inobt_irec_to_allocmask(rec); in xfs_inobt_first_free_inode()
1107 realfree &= rec->ir_free; in xfs_inobt_first_free_inode()
1129 struct xfs_inobt_rec_incore rec, trec; in xfs_dialloc_ag_inobt() local
1167 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1172 if (rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
1203 &rec, &doneright); in xfs_dialloc_ag_inobt()
1213 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0); in xfs_dialloc_ag_inobt()
1228 rec.ir_startino - pagino; in xfs_dialloc_ag_inobt()
1239 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1241 rec = trec; in xfs_dialloc_ag_inobt()
1246 if (!useleft && rec.ir_freecount) { in xfs_dialloc_ag_inobt()
1250 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1260 error = xfs_ialloc_next_rec(cur, &rec, in xfs_dialloc_ag_inobt()
1274 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1305 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1309 if (j == 1 && rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
1328 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_inobt()
1332 if (rec.ir_freecount > 0) in xfs_dialloc_ag_inobt()
1341 offset = xfs_inobt_first_free_inode(&rec); in xfs_dialloc_ag_inobt()
1344 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag_inobt()
1346 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag_inobt()
1347 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_inobt()
1348 rec.ir_freecount--; in xfs_dialloc_ag_inobt()
1349 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_inobt()
1381 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_near() argument
1394 error = xfs_inobt_get_rec(lcur, rec, &i); in xfs_dialloc_ag_finobt_near()
1404 if (pagino >= rec->ir_startino && in xfs_dialloc_ag_finobt_near()
1405 pagino < (rec->ir_startino + XFS_INODES_PER_CHUNK)) in xfs_dialloc_ag_finobt_near()
1429 if ((pagino - rec->ir_startino + XFS_INODES_PER_CHUNK - 1) > in xfs_dialloc_ag_finobt_near()
1431 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1439 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1462 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_newino() argument
1473 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1489 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1507 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag_update_inobt() local
1516 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_update_inobt()
1520 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) % in xfs_dialloc_ag_update_inobt()
1523 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_update_inobt()
1524 rec.ir_freecount--; in xfs_dialloc_ag_update_inobt()
1526 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, (rec.ir_free == frec->ir_free) && in xfs_dialloc_ag_update_inobt()
1527 (rec.ir_freecount == frec->ir_freecount)); in xfs_dialloc_ag_update_inobt()
1529 return xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_update_inobt()
1554 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag() local
1584 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec); in xfs_dialloc_ag()
1586 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec); in xfs_dialloc_ag()
1590 offset = xfs_inobt_first_free_inode(&rec); in xfs_dialloc_ag()
1593 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag()
1595 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag()
1600 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag()
1601 rec.ir_freecount--; in xfs_dialloc_ag()
1602 if (rec.ir_freecount) in xfs_dialloc_ag()
1603 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag()
1621 error = xfs_dialloc_ag_update_inobt(icur, &rec, offset); in xfs_dialloc_ag()
1828 struct xfs_inobt_rec_incore *rec, in xfs_difree_inode_chunk() argument
1831 xfs_agblock_t sagbno = XFS_AGINO_TO_AGBNO(mp, rec->ir_startino); in xfs_difree_inode_chunk()
1840 if (!xfs_inobt_issparse(rec->ir_holemask)) { in xfs_difree_inode_chunk()
1848 ASSERT(sizeof(rec->ir_holemask) <= sizeof(holemask[0])); in xfs_difree_inode_chunk()
1849 holemask[0] = rec->ir_holemask; in xfs_difree_inode_chunk()
1911 struct xfs_inobt_rec_incore rec; in xfs_difree_inobt() local
1938 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_inobt()
1948 off = agino - rec.ir_startino; in xfs_difree_inobt()
1950 ASSERT(!(rec.ir_free & XFS_INOBT_MASK(off))); in xfs_difree_inobt()
1954 rec.ir_free |= XFS_INOBT_MASK(off); in xfs_difree_inobt()
1955 rec.ir_freecount++; in xfs_difree_inobt()
1963 rec.ir_free == XFS_INOBT_ALL_FREE && in xfs_difree_inobt()
1966 xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); in xfs_difree_inobt()
1967 xic->alloc = xfs_inobt_irec_to_allocmask(&rec); in xfs_difree_inobt()
1974 ilen = rec.ir_freecount; in xfs_difree_inobt()
1990 xfs_difree_inode_chunk(mp, agno, &rec, dfops); in xfs_difree_inobt()
1994 error = xfs_inobt_update(cur, &rec); in xfs_difree_inobt()
2016 *orec = rec; in xfs_difree_inobt()
2039 struct xfs_inobt_rec_incore rec; in xfs_difree_finobt() local
2075 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_finobt()
2080 rec.ir_free |= XFS_INOBT_MASK(offset); in xfs_difree_finobt()
2081 rec.ir_freecount++; in xfs_difree_finobt()
2083 XFS_WANT_CORRUPTED_GOTO(mp, (rec.ir_free == ibtrec->ir_free) && in xfs_difree_finobt()
2084 (rec.ir_freecount == ibtrec->ir_freecount), in xfs_difree_finobt()
2099 if (rec.ir_free == XFS_INOBT_ALL_FREE && in xfs_difree_finobt()
2107 error = xfs_inobt_update(cur, &rec); in xfs_difree_finobt()
2145 struct xfs_inobt_rec_incore rec;/* btree record */ in xfs_difree() local
2187 error = xfs_difree_inobt(mp, tp, agbp, agino, dfops, xic, &rec); in xfs_difree()
2195 error = xfs_difree_finobt(mp, tp, agbp, agino, &rec); in xfs_difree()
2217 struct xfs_inobt_rec_incore rec; in xfs_imap_lookup() local
2241 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_imap_lookup()
2252 if (rec.ir_startino > agino || in xfs_imap_lookup()
2253 rec.ir_startino + mp->m_ialloc_inos <= agino) in xfs_imap_lookup()
2258 (rec.ir_free & XFS_INOBT_MASK(agino - rec.ir_startino))) in xfs_imap_lookup()
2261 *chunk_agbno = XFS_AGINO_TO_AGBNO(mp, rec.ir_startino); in xfs_imap_lookup()