• Home
  • Raw
  • Download

Lines Matching refs:cur

36 	struct xfs_btree_cur	*cur,	/* btree cursor */  in xfs_inobt_lookup()  argument
41 cur->bc_rec.i.ir_startino = ino; in xfs_inobt_lookup()
42 cur->bc_rec.i.ir_holemask = 0; in xfs_inobt_lookup()
43 cur->bc_rec.i.ir_count = 0; in xfs_inobt_lookup()
44 cur->bc_rec.i.ir_freecount = 0; in xfs_inobt_lookup()
45 cur->bc_rec.i.ir_free = 0; in xfs_inobt_lookup()
46 return xfs_btree_lookup(cur, dir, stat); in xfs_inobt_lookup()
55 struct xfs_btree_cur *cur, /* btree cursor */ in xfs_inobt_update() argument
61 if (xfs_has_sparseinodes(cur->bc_mp)) { in xfs_inobt_update()
70 return xfs_btree_update(cur, &rec); in xfs_inobt_update()
103 struct xfs_btree_cur *cur, in xfs_inobt_get_rec() argument
107 struct xfs_mount *mp = cur->bc_mp; in xfs_inobt_get_rec()
112 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_inobt_get_rec()
118 if (!xfs_verify_agino(cur->bc_ag.pag, irec->ir_startino)) in xfs_inobt_get_rec()
139 cur->bc_btnum == XFS_BTNUM_INO ? "Used" : "Free", in xfs_inobt_get_rec()
140 cur->bc_ag.pag->pag_agno); in xfs_inobt_get_rec()
153 struct xfs_btree_cur *cur, in xfs_inobt_insert_rec() argument
160 cur->bc_rec.i.ir_holemask = holemask; in xfs_inobt_insert_rec()
161 cur->bc_rec.i.ir_count = count; in xfs_inobt_insert_rec()
162 cur->bc_rec.i.ir_freecount = freecount; in xfs_inobt_insert_rec()
163 cur->bc_rec.i.ir_free = free; in xfs_inobt_insert_rec()
164 return xfs_btree_insert(cur, stat); in xfs_inobt_insert_rec()
180 struct xfs_btree_cur *cur; in xfs_inobt_insert() local
185 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, btnum); in xfs_inobt_insert()
190 error = xfs_inobt_lookup(cur, thisino, XFS_LOOKUP_EQ, &i); in xfs_inobt_insert()
192 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_inobt_insert()
197 error = xfs_inobt_insert_rec(cur, XFS_INOBT_HOLEMASK_FULL, in xfs_inobt_insert()
202 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_inobt_insert()
208 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_inobt_insert()
219 struct xfs_btree_cur *cur) in xfs_check_agi_freecount() argument
221 if (cur->bc_nlevels == 1) { in xfs_check_agi_freecount()
227 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); in xfs_check_agi_freecount()
232 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_check_agi_freecount()
238 error = xfs_btree_increment(cur, 0, &i); in xfs_check_agi_freecount()
244 if (!xfs_is_shutdown(cur->bc_mp)) in xfs_check_agi_freecount()
245 ASSERT(freecount == cur->bc_ag.pag->pagi_freecount); in xfs_check_agi_freecount()
250 #define xfs_check_agi_freecount(cur) 0 argument
525 struct xfs_btree_cur *cur; in xfs_inobt_insert_sprec() local
530 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, btnum); in xfs_inobt_insert_sprec()
533 error = xfs_inobt_lookup(cur, nrec->ir_startino, XFS_LOOKUP_EQ, &i); in xfs_inobt_insert_sprec()
538 error = xfs_inobt_insert_rec(cur, nrec->ir_holemask, in xfs_inobt_insert_sprec()
556 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_inobt_insert_sprec()
592 error = xfs_inobt_update(cur, nrec); in xfs_inobt_insert_sprec()
597 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_inobt_insert_sprec()
600 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_inobt_insert_sprec()
906 struct xfs_btree_cur *cur, in xfs_ialloc_next_rec() argument
915 error = xfs_btree_decrement(cur, 0, &i); in xfs_ialloc_next_rec()
917 error = xfs_btree_increment(cur, 0, &i); in xfs_ialloc_next_rec()
923 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_next_rec()
926 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_ialloc_next_rec()
935 struct xfs_btree_cur *cur, in xfs_ialloc_get_rec() argument
943 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_EQ, &i); in xfs_ialloc_get_rec()
948 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_get_rec()
951 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_ialloc_get_rec()
994 struct xfs_btree_cur *cur, *tcur; in xfs_dialloc_ag_inobt() local
1007 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_INO); in xfs_dialloc_ag_inobt()
1015 error = xfs_check_agi_freecount(cur); in xfs_dialloc_ag_inobt()
1026 error = xfs_inobt_lookup(cur, pagino, XFS_LOOKUP_LE, &i); in xfs_dialloc_ag_inobt()
1034 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1056 error = xfs_btree_dup_cursor(cur, &tcur); in xfs_dialloc_ag_inobt()
1072 error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec, in xfs_dialloc_ag_inobt()
1083 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0); in xfs_dialloc_ag_inobt()
1105 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag_inobt()
1106 cur = tcur; in xfs_dialloc_ag_inobt()
1130 error = xfs_ialloc_next_rec(cur, &rec, in xfs_dialloc_ag_inobt()
1159 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag_inobt()
1169 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino), in xfs_dialloc_ag_inobt()
1175 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag_inobt()
1192 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); in xfs_dialloc_ag_inobt()
1201 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_inobt()
1210 error = xfs_btree_increment(cur, 0, &i); in xfs_dialloc_ag_inobt()
1228 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_inobt()
1235 error = xfs_check_agi_freecount(cur); in xfs_dialloc_ag_inobt()
1239 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag_inobt()
1246 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_dialloc_ag_inobt()
1345 struct xfs_btree_cur *cur, in xfs_dialloc_ag_finobt_newino() argument
1352 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino), in xfs_dialloc_ag_finobt_newino()
1357 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1360 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_dialloc_ag_finobt_newino()
1369 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); in xfs_dialloc_ag_finobt_newino()
1372 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_dialloc_ag_finobt_newino()
1375 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_dialloc_ag_finobt_newino()
1378 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_dialloc_ag_finobt_newino()
1390 struct xfs_btree_cur *cur, /* inobt cursor */ in xfs_dialloc_ag_update_inobt() argument
1398 error = xfs_inobt_lookup(cur, frec->ir_startino, XFS_LOOKUP_EQ, &i); in xfs_dialloc_ag_update_inobt()
1401 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_dialloc_ag_update_inobt()
1404 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag_update_inobt()
1407 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) in xfs_dialloc_ag_update_inobt()
1409 ASSERT((XFS_AGINO_TO_OFFSET(cur->bc_mp, rec.ir_startino) % in xfs_dialloc_ag_update_inobt()
1415 if (XFS_IS_CORRUPT(cur->bc_mp, in xfs_dialloc_ag_update_inobt()
1420 return xfs_inobt_update(cur, &rec); in xfs_dialloc_ag_update_inobt()
1442 struct xfs_btree_cur *cur; /* finobt cursor */ in xfs_dialloc_ag() local
1460 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_FINO); in xfs_dialloc_ag()
1462 error = xfs_check_agi_freecount(cur); in xfs_dialloc_ag()
1472 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec); in xfs_dialloc_ag()
1474 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec); in xfs_dialloc_ag()
1491 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag()
1493 error = xfs_btree_delete(cur, &i); in xfs_dialloc_ag()
1526 error = xfs_check_agi_freecount(cur); in xfs_dialloc_ag()
1531 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag()
1538 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_dialloc_ag()
1897 struct xfs_btree_cur *cur; in xfs_difree_inobt() local
1910 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_INO); in xfs_difree_inobt()
1912 error = xfs_check_agi_freecount(cur); in xfs_difree_inobt()
1919 if ((error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i))) { in xfs_difree_inobt()
1928 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_inobt()
1978 if ((error = xfs_btree_delete(cur, &i))) { in xfs_difree_inobt()
1988 error = xfs_inobt_update(cur, &rec); in xfs_difree_inobt()
2004 error = xfs_check_agi_freecount(cur); in xfs_difree_inobt()
2009 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_difree_inobt()
2013 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_difree_inobt()
2029 struct xfs_btree_cur *cur; in xfs_difree_finobt() local
2035 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_FINO); in xfs_difree_finobt()
2037 error = xfs_inobt_lookup(cur, ibtrec->ir_startino, XFS_LOOKUP_EQ, &i); in xfs_difree_finobt()
2051 error = xfs_inobt_insert_rec(cur, ibtrec->ir_holemask, in xfs_difree_finobt()
2069 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree_finobt()
2101 error = xfs_btree_delete(cur, &i); in xfs_difree_finobt()
2106 error = xfs_inobt_update(cur, &rec); in xfs_difree_finobt()
2112 error = xfs_check_agi_freecount(cur); in xfs_difree_finobt()
2116 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_difree_finobt()
2120 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_difree_finobt()
2213 struct xfs_btree_cur *cur; in xfs_imap_lookup() local
2232 cur = xfs_inobt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_INO); in xfs_imap_lookup()
2233 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i); in xfs_imap_lookup()
2236 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_imap_lookup()
2242 xfs_btree_del_cursor(cur, error); in xfs_imap_lookup()
2638 struct xfs_btree_cur *cur, in xfs_ialloc_has_inode_record() argument
2651 error = xfs_inobt_lookup(cur, low, XFS_LOOKUP_LE, &has_record); in xfs_ialloc_has_inode_record()
2653 error = xfs_inobt_get_rec(cur, &irec, &has_record); in xfs_ialloc_has_inode_record()
2670 error = xfs_btree_increment(cur, 0, &has_record); in xfs_ialloc_has_inode_record()
2678 struct xfs_btree_cur *cur, in xfs_ialloc_has_inodes_at_extent() argument
2686 low = XFS_AGB_TO_AGINO(cur->bc_mp, bno); in xfs_ialloc_has_inodes_at_extent()
2687 high = XFS_AGB_TO_AGINO(cur->bc_mp, bno + len) - 1; in xfs_ialloc_has_inodes_at_extent()
2689 return xfs_ialloc_has_inode_record(cur, low, high, exists); in xfs_ialloc_has_inodes_at_extent()
2700 struct xfs_btree_cur *cur, in xfs_ialloc_count_inodes_rec() argument
2707 xfs_inobt_btrec_to_irec(cur->bc_mp, rec, &irec); in xfs_ialloc_count_inodes_rec()
2717 struct xfs_btree_cur *cur, in xfs_ialloc_count_inodes() argument
2724 ASSERT(cur->bc_btnum == XFS_BTNUM_INO); in xfs_ialloc_count_inodes()
2725 error = xfs_btree_query_all(cur, xfs_ialloc_count_inodes_rec, &ci); in xfs_ialloc_count_inodes()
2933 struct xfs_btree_cur *cur; in xfs_ialloc_check_shrink() local
2944 cur = xfs_inobt_init_cursor(mp, tp, agibp, pag, XFS_BTNUM_INO); in xfs_ialloc_check_shrink()
2947 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &has); in xfs_ialloc_check_shrink()
2951 error = xfs_inobt_get_rec(cur, &rec, &has); in xfs_ialloc_check_shrink()
2966 xfs_btree_del_cursor(cur, error); in xfs_ialloc_check_shrink()