Lines Matching refs:rec
82 union xfs_btree_rec rec; in xfs_inobt_update() local
84 rec.inobt.ir_startino = cpu_to_be32(irec->ir_startino); in xfs_inobt_update()
85 rec.inobt.ir_freecount = cpu_to_be32(irec->ir_freecount); in xfs_inobt_update()
86 rec.inobt.ir_free = cpu_to_be64(irec->ir_free); in xfs_inobt_update()
87 return xfs_btree_update(cur, &rec); in xfs_inobt_update()
99 union xfs_btree_rec *rec; in xfs_inobt_get_rec() local
102 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_inobt_get_rec()
104 irec->ir_startino = be32_to_cpu(rec->inobt.ir_startino); in xfs_inobt_get_rec()
105 irec->ir_freecount = be32_to_cpu(rec->inobt.ir_freecount); in xfs_inobt_get_rec()
106 irec->ir_free = be64_to_cpu(rec->inobt.ir_free); in xfs_inobt_get_rec()
181 xfs_inobt_rec_incore_t rec; in xfs_check_agi_freecount() local
191 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_check_agi_freecount()
196 freecount += rec.ir_freecount; in xfs_check_agi_freecount()
685 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_next_rec() argument
701 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_next_rec()
714 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_get_rec() argument
725 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_get_rec()
751 struct xfs_inobt_rec_incore rec, trec; in xfs_dialloc_ag_inobt() local
789 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
794 if (rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
825 &rec, &doneright); in xfs_dialloc_ag_inobt()
835 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0); in xfs_dialloc_ag_inobt()
853 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
862 rec.ir_startino - pagino; in xfs_dialloc_ag_inobt()
869 rec = trec; in xfs_dialloc_ag_inobt()
874 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
880 if (!useleft && rec.ir_freecount) { in xfs_dialloc_ag_inobt()
884 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
894 error = xfs_ialloc_next_rec(cur, &rec, in xfs_dialloc_ag_inobt()
928 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
932 if (j == 1 && rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
951 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_inobt()
955 if (rec.ir_freecount > 0) in xfs_dialloc_ag_inobt()
964 offset = xfs_lowbit64(rec.ir_free); in xfs_dialloc_ag_inobt()
967 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag_inobt()
969 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag_inobt()
970 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_inobt()
971 rec.ir_freecount--; in xfs_dialloc_ag_inobt()
972 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_inobt()
1004 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_near() argument
1017 error = xfs_inobt_get_rec(lcur, rec, &i); in xfs_dialloc_ag_finobt_near()
1027 if (pagino >= rec->ir_startino && in xfs_dialloc_ag_finobt_near()
1028 pagino < (rec->ir_startino + XFS_INODES_PER_CHUNK)) in xfs_dialloc_ag_finobt_near()
1052 if ((pagino - rec->ir_startino + XFS_INODES_PER_CHUNK - 1) > in xfs_dialloc_ag_finobt_near()
1054 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1062 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1085 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_newino() argument
1096 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1112 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1130 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag_update_inobt() local
1139 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_update_inobt()
1143 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) % in xfs_dialloc_ag_update_inobt()
1146 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_update_inobt()
1147 rec.ir_freecount--; in xfs_dialloc_ag_update_inobt()
1149 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, (rec.ir_free == frec->ir_free) && in xfs_dialloc_ag_update_inobt()
1150 (rec.ir_freecount == frec->ir_freecount)); in xfs_dialloc_ag_update_inobt()
1152 return xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_update_inobt()
1177 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag() local
1207 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec); in xfs_dialloc_ag()
1209 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec); in xfs_dialloc_ag()
1213 offset = xfs_lowbit64(rec.ir_free); in xfs_dialloc_ag()
1216 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag()
1218 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag()
1223 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag()
1224 rec.ir_freecount--; in xfs_dialloc_ag()
1225 if (rec.ir_freecount) in xfs_dialloc_ag()
1226 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag()
1244 error = xfs_dialloc_ag_update_inobt(icur, &rec, offset); in xfs_dialloc_ag()
1457 struct xfs_inobt_rec_incore rec; in xfs_difree_inobt() local
1484 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_inobt()
1494 off = agino - rec.ir_startino; in xfs_difree_inobt()
1496 ASSERT(!(rec.ir_free & XFS_INOBT_MASK(off))); in xfs_difree_inobt()
1500 rec.ir_free |= XFS_INOBT_MASK(off); in xfs_difree_inobt()
1501 rec.ir_freecount++; in xfs_difree_inobt()
1507 (rec.ir_freecount == mp->m_ialloc_inos)) { in xfs_difree_inobt()
1510 *first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); in xfs_difree_inobt()
1534 XFS_AGINO_TO_AGBNO(mp, rec.ir_startino)), in xfs_difree_inobt()
1539 error = xfs_inobt_update(cur, &rec); in xfs_difree_inobt()
1561 *orec = rec; in xfs_difree_inobt()
1584 struct xfs_inobt_rec_incore rec; in xfs_difree_finobt() local
1618 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_finobt()
1623 rec.ir_free |= XFS_INOBT_MASK(offset); in xfs_difree_finobt()
1624 rec.ir_freecount++; in xfs_difree_finobt()
1626 XFS_WANT_CORRUPTED_GOTO(mp, (rec.ir_free == ibtrec->ir_free) && in xfs_difree_finobt()
1627 (rec.ir_freecount == ibtrec->ir_freecount), in xfs_difree_finobt()
1638 if (rec.ir_freecount == mp->m_ialloc_inos && in xfs_difree_finobt()
1645 error = xfs_inobt_update(cur, &rec); in xfs_difree_finobt()
1684 struct xfs_inobt_rec_incore rec;/* btree record */ in xfs_difree() local
1727 &rec); in xfs_difree()
1735 error = xfs_difree_finobt(mp, tp, agbp, agino, &rec); in xfs_difree()
1757 struct xfs_inobt_rec_incore rec; in xfs_imap_lookup() local
1781 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_imap_lookup()
1792 if (rec.ir_startino > agino || in xfs_imap_lookup()
1793 rec.ir_startino + mp->m_ialloc_inos <= agino) in xfs_imap_lookup()
1798 (rec.ir_free & XFS_INOBT_MASK(agino - rec.ir_startino))) in xfs_imap_lookup()
1801 *chunk_agbno = XFS_AGINO_TO_AGBNO(mp, rec.ir_startino); in xfs_imap_lookup()