Lines Matching refs:rcur
100 struct xfs_btree_cur *rcur, in xfs_rmap_insert() argument
110 trace_xfs_rmap_insert(rcur->bc_mp, rcur->bc_ag.agno, agbno, in xfs_rmap_insert()
113 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_insert()
116 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 0)) { in xfs_rmap_insert()
121 rcur->bc_rec.r.rm_startblock = agbno; in xfs_rmap_insert()
122 rcur->bc_rec.r.rm_blockcount = len; in xfs_rmap_insert()
123 rcur->bc_rec.r.rm_owner = owner; in xfs_rmap_insert()
124 rcur->bc_rec.r.rm_offset = offset; in xfs_rmap_insert()
125 rcur->bc_rec.r.rm_flags = flags; in xfs_rmap_insert()
126 error = xfs_btree_insert(rcur, &i); in xfs_rmap_insert()
129 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_insert()
135 trace_xfs_rmap_insert_error(rcur->bc_mp, in xfs_rmap_insert()
136 rcur->bc_ag.agno, error, _RET_IP_); in xfs_rmap_insert()
142 struct xfs_btree_cur *rcur, in xfs_rmap_delete() argument
152 trace_xfs_rmap_delete(rcur->bc_mp, rcur->bc_ag.agno, agbno, in xfs_rmap_delete()
155 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_delete()
158 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_delete()
163 error = xfs_btree_delete(rcur, &i); in xfs_rmap_delete()
166 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_delete()
172 trace_xfs_rmap_delete_error(rcur->bc_mp, in xfs_rmap_delete()
173 rcur->bc_ag.agno, error, _RET_IP_); in xfs_rmap_delete()
2332 struct xfs_btree_cur *rcur, in xfs_rmap_finish_one_cleanup() argument
2337 if (rcur == NULL) in xfs_rmap_finish_one_cleanup()
2339 agbp = rcur->bc_ag.agbp; in xfs_rmap_finish_one_cleanup()
2340 xfs_btree_del_cursor(rcur, error); in xfs_rmap_finish_one_cleanup()
2365 struct xfs_btree_cur *rcur; in xfs_rmap_finish_one() local
2388 rcur = *pcur; in xfs_rmap_finish_one()
2389 if (rcur != NULL && rcur->bc_ag.agno != agno) { in xfs_rmap_finish_one()
2390 xfs_rmap_finish_one_cleanup(tp, rcur, 0); in xfs_rmap_finish_one()
2391 rcur = NULL; in xfs_rmap_finish_one()
2394 if (rcur == NULL) { in xfs_rmap_finish_one()
2406 rcur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno); in xfs_rmap_finish_one()
2407 if (!rcur) { in xfs_rmap_finish_one()
2412 *pcur = rcur; in xfs_rmap_finish_one()
2416 bno = XFS_FSB_TO_AGBNO(rcur->bc_mp, startblock); in xfs_rmap_finish_one()
2421 error = xfs_rmap_map(rcur, bno, blockcount, unwritten, &oinfo); in xfs_rmap_finish_one()
2424 error = xfs_rmap_map_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2429 error = xfs_rmap_unmap(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2433 error = xfs_rmap_unmap_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2437 error = xfs_rmap_convert(rcur, bno, blockcount, !unwritten, in xfs_rmap_finish_one()
2441 error = xfs_rmap_convert_shared(rcur, bno, blockcount, in xfs_rmap_finish_one()