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()
2398 struct xfs_btree_cur *rcur; in xfs_rmap_finish_one() local
2423 rcur = *pcur; in xfs_rmap_finish_one()
2424 if (rcur != NULL && rcur->bc_ag.pag != pag) { in xfs_rmap_finish_one()
2425 xfs_rmap_finish_one_cleanup(tp, rcur, 0); in xfs_rmap_finish_one()
2426 rcur = NULL; in xfs_rmap_finish_one()
2429 if (rcur == NULL) { in xfs_rmap_finish_one()
2443 rcur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag); in xfs_rmap_finish_one()
2445 *pcur = rcur; in xfs_rmap_finish_one()
2450 bno = XFS_FSB_TO_AGBNO(rcur->bc_mp, ri->ri_bmap.br_startblock); in xfs_rmap_finish_one()
2455 error = xfs_rmap_map(rcur, bno, ri->ri_bmap.br_blockcount, in xfs_rmap_finish_one()
2459 error = xfs_rmap_map_shared(rcur, bno, in xfs_rmap_finish_one()
2464 error = xfs_rmap_unmap(rcur, bno, ri->ri_bmap.br_blockcount, in xfs_rmap_finish_one()
2468 error = xfs_rmap_unmap_shared(rcur, bno, in xfs_rmap_finish_one()
2472 error = xfs_rmap_convert(rcur, bno, ri->ri_bmap.br_blockcount, in xfs_rmap_finish_one()
2476 error = xfs_rmap_convert_shared(rcur, bno, in xfs_rmap_finish_one()