Lines Matching refs:rcur

118 	struct xfs_btree_cur	*rcur,  in xfs_rmap_insert()  argument
128 trace_xfs_rmap_insert(rcur->bc_mp, rcur->bc_ag.pag->pag_agno, agbno, in xfs_rmap_insert()
131 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_insert()
134 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 0)) { in xfs_rmap_insert()
139 rcur->bc_rec.r.rm_startblock = agbno; in xfs_rmap_insert()
140 rcur->bc_rec.r.rm_blockcount = len; in xfs_rmap_insert()
141 rcur->bc_rec.r.rm_owner = owner; in xfs_rmap_insert()
142 rcur->bc_rec.r.rm_offset = offset; in xfs_rmap_insert()
143 rcur->bc_rec.r.rm_flags = flags; in xfs_rmap_insert()
144 error = xfs_btree_insert(rcur, &i); in xfs_rmap_insert()
147 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_insert()
153 trace_xfs_rmap_insert_error(rcur->bc_mp, in xfs_rmap_insert()
154 rcur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_rmap_insert()
160 struct xfs_btree_cur *rcur, in xfs_rmap_delete() argument
170 trace_xfs_rmap_delete(rcur->bc_mp, rcur->bc_ag.pag->pag_agno, agbno, in xfs_rmap_delete()
173 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_delete()
176 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_delete()
181 error = xfs_btree_delete(rcur, &i); in xfs_rmap_delete()
184 if (XFS_IS_CORRUPT(rcur->bc_mp, i != 1)) { in xfs_rmap_delete()
190 trace_xfs_rmap_delete_error(rcur->bc_mp, in xfs_rmap_delete()
191 rcur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_rmap_delete()
2370 struct xfs_btree_cur *rcur, in xfs_rmap_finish_one_cleanup() argument
2375 if (rcur == NULL) in xfs_rmap_finish_one_cleanup()
2377 agbp = rcur->bc_ag.agbp; in xfs_rmap_finish_one_cleanup()
2378 xfs_btree_del_cursor(rcur, error); in xfs_rmap_finish_one_cleanup()
2404 struct xfs_btree_cur *rcur; in xfs_rmap_finish_one() local
2427 rcur = *pcur; in xfs_rmap_finish_one()
2428 if (rcur != NULL && rcur->bc_ag.pag != pag) { in xfs_rmap_finish_one()
2429 xfs_rmap_finish_one_cleanup(tp, rcur, 0); in xfs_rmap_finish_one()
2430 rcur = NULL; in xfs_rmap_finish_one()
2433 if (rcur == NULL) { in xfs_rmap_finish_one()
2447 rcur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag); in xfs_rmap_finish_one()
2449 *pcur = rcur; in xfs_rmap_finish_one()
2453 bno = XFS_FSB_TO_AGBNO(rcur->bc_mp, startblock); in xfs_rmap_finish_one()
2458 error = xfs_rmap_map(rcur, bno, blockcount, unwritten, &oinfo); in xfs_rmap_finish_one()
2461 error = xfs_rmap_map_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2466 error = xfs_rmap_unmap(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2470 error = xfs_rmap_unmap_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2474 error = xfs_rmap_convert(rcur, bno, blockcount, !unwritten, in xfs_rmap_finish_one()
2478 error = xfs_rmap_convert_shared(rcur, bno, blockcount, in xfs_rmap_finish_one()