• Home
  • Raw
  • Download

Lines Matching refs:rec

58 	union xfs_btree_rec	rec;  in xfs_inobt_update()  local
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()
70 return xfs_btree_update(cur, &rec); in xfs_inobt_update()
77 union xfs_btree_rec *rec, 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()
93 be32_to_cpu(rec->inobt.ir_u.f.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()
109 union xfs_btree_rec *rec; in xfs_inobt_get_rec() local
113 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_inobt_get_rec()
117 xfs_inobt_btrec_to_irec(mp, rec, irec); in xfs_inobt_get_rec()
224 xfs_inobt_rec_incore_t rec; in xfs_check_agi_freecount() local
234 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_check_agi_freecount()
239 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()
619 struct xfs_inobt_rec_incore rec; in xfs_ialloc_ag_alloc() local
820 rec.ir_startino = newino; in xfs_ialloc_ag_alloc()
821 rec.ir_holemask = ~allocmask; in xfs_ialloc_ag_alloc()
822 rec.ir_count = newlen; in xfs_ialloc_ag_alloc()
823 rec.ir_freecount = newlen; in xfs_ialloc_ag_alloc()
824 rec.ir_free = XFS_INOBT_ALL_FREE; in xfs_ialloc_ag_alloc()
832 &rec, true); in xfs_ialloc_ag_alloc()
837 rec.ir_startino), in xfs_ialloc_ag_alloc()
838 rec.ir_holemask, rec.ir_count); in xfs_ialloc_ag_alloc()
857 XFS_BTNUM_FINO, &rec, in xfs_ialloc_ag_alloc()
1041 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_next_rec() argument
1057 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_next_rec()
1070 xfs_inobt_rec_incore_t *rec, in xfs_ialloc_get_rec() argument
1081 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_get_rec()
1097 struct xfs_inobt_rec_incore *rec) in xfs_inobt_first_free_inode() argument
1102 if (!xfs_inobt_issparse(rec->ir_holemask)) in xfs_inobt_first_free_inode()
1103 return xfs_lowbit64(rec->ir_free); in xfs_inobt_first_free_inode()
1105 realfree = xfs_inobt_irec_to_allocmask(rec); in xfs_inobt_first_free_inode()
1106 realfree &= rec->ir_free; in xfs_inobt_first_free_inode()
1128 struct xfs_inobt_rec_incore rec, trec; in xfs_dialloc_ag_inobt() local
1166 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1171 if (rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
1202 &rec, &doneright); in xfs_dialloc_ag_inobt()
1212 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0); in xfs_dialloc_ag_inobt()
1227 rec.ir_startino - pagino; in xfs_dialloc_ag_inobt()
1238 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1240 rec = trec; in xfs_dialloc_ag_inobt()
1245 if (!useleft && rec.ir_freecount) { in xfs_dialloc_ag_inobt()
1249 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1259 error = xfs_ialloc_next_rec(cur, &rec, in xfs_dialloc_ag_inobt()
1273 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc_ag_inobt()
1304 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1308 if (j == 1 && rec.ir_freecount > 0) { in xfs_dialloc_ag_inobt()
1327 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_inobt()
1331 if (rec.ir_freecount > 0) in xfs_dialloc_ag_inobt()
1340 offset = xfs_inobt_first_free_inode(&rec); in xfs_dialloc_ag_inobt()
1343 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag_inobt()
1345 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag_inobt()
1346 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_inobt()
1347 rec.ir_freecount--; in xfs_dialloc_ag_inobt()
1348 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_inobt()
1380 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_near() argument
1393 error = xfs_inobt_get_rec(lcur, rec, &i); in xfs_dialloc_ag_finobt_near()
1403 if (pagino >= rec->ir_startino && in xfs_dialloc_ag_finobt_near()
1404 pagino < (rec->ir_startino + XFS_INODES_PER_CHUNK)) in xfs_dialloc_ag_finobt_near()
1428 if ((pagino - rec->ir_startino + XFS_INODES_PER_CHUNK - 1) > in xfs_dialloc_ag_finobt_near()
1430 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1438 *rec = rrec; in xfs_dialloc_ag_finobt_near()
1461 struct xfs_inobt_rec_incore *rec) in xfs_dialloc_ag_finobt_newino() argument
1472 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1488 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1506 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag_update_inobt() local
1515 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_update_inobt()
1519 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) % in xfs_dialloc_ag_update_inobt()
1522 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag_update_inobt()
1523 rec.ir_freecount--; in xfs_dialloc_ag_update_inobt()
1525 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, (rec.ir_free == frec->ir_free) && in xfs_dialloc_ag_update_inobt()
1526 (rec.ir_freecount == frec->ir_freecount)); in xfs_dialloc_ag_update_inobt()
1528 return xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_update_inobt()
1553 struct xfs_inobt_rec_incore rec; in xfs_dialloc_ag() local
1583 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec); in xfs_dialloc_ag()
1585 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec); in xfs_dialloc_ag()
1589 offset = xfs_inobt_first_free_inode(&rec); in xfs_dialloc_ag()
1592 ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % in xfs_dialloc_ag()
1594 ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); in xfs_dialloc_ag()
1599 rec.ir_free &= ~XFS_INOBT_MASK(offset); in xfs_dialloc_ag()
1600 rec.ir_freecount--; in xfs_dialloc_ag()
1601 if (rec.ir_freecount) in xfs_dialloc_ag()
1602 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag()
1620 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
1832 rec->ir_startino); in xfs_difree_inode_chunk()
1839 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()
1910 struct xfs_inobt_rec_incore rec; in xfs_difree_inobt() local
1937 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_inobt()
1947 off = agino - rec.ir_startino; in xfs_difree_inobt()
1949 ASSERT(!(rec.ir_free & XFS_INOBT_MASK(off))); in xfs_difree_inobt()
1953 rec.ir_free |= XFS_INOBT_MASK(off); in xfs_difree_inobt()
1954 rec.ir_freecount++; in xfs_difree_inobt()
1962 rec.ir_free == XFS_INOBT_ALL_FREE && in xfs_difree_inobt()
1965 xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); in xfs_difree_inobt()
1966 xic->alloc = xfs_inobt_irec_to_allocmask(&rec); in xfs_difree_inobt()
1973 ilen = rec.ir_freecount; in xfs_difree_inobt()
1990 xfs_difree_inode_chunk(tp, agno, &rec); 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()
2144 struct xfs_inobt_rec_incore rec;/* btree record */ in xfs_difree() local
2186 error = xfs_difree_inobt(mp, tp, agbp, agino, xic, &rec); in xfs_difree()
2194 error = xfs_difree_finobt(mp, tp, agbp, agino, &rec); in xfs_difree()
2216 struct xfs_inobt_rec_incore rec; in xfs_imap_lookup() local
2240 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_imap_lookup()
2251 if (rec.ir_startino > agino || in xfs_imap_lookup()
2252 rec.ir_startino + M_IGEO(mp)->ialloc_inos <= agino) in xfs_imap_lookup()
2257 (rec.ir_free & XFS_INOBT_MASK(agino - rec.ir_startino))) in xfs_imap_lookup()
2260 *chunk_agbno = XFS_AGINO_TO_AGBNO(mp, rec.ir_startino); in xfs_imap_lookup()
2713 union xfs_btree_rec *rec, in xfs_ialloc_count_inodes_rec() argument
2719 xfs_inobt_btrec_to_irec(cur->bc_mp, rec, &irec); in xfs_ialloc_count_inodes_rec()