From 1ae8ef28e7c511ac754429c8c061513fdf1c22b6 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 30 Sep 2013 16:27:39 -0700 Subject: [PATCH] ReplicatedPG: copy: take an ObjectContextRef in start_copy and use that Signed-off-by: Greg Farnum --- src/osd/ReplicatedPG.cc | 10 +++++----- src/osd/ReplicatedPG.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index aba0a1067c0..cfac7dd7db2 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3764,7 +3764,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops) result = -EINVAL; break; } - result = start_copy(ctx, src, src_oloc, src_version); + result = start_copy(ctx, ctx->obc, src, src_oloc, src_version); if (result < 0) goto fail; result = -EINPROGRESS; @@ -4379,7 +4379,7 @@ struct C_Copyfrom : public Context { } }; -int ReplicatedPG::start_copy(OpContext *ctx, +int ReplicatedPG::start_copy(OpContext *ctx, ObjectContextRef obc, hobject_t src, object_locator_t oloc, version_t version) { const hobject_t& dest = ctx->obs->oi.soid; @@ -4395,12 +4395,12 @@ int ReplicatedPG::start_copy(OpContext *ctx, cancel_copy(cop); } - CopyOpRef cop(new CopyOp(ctx, ctx->obc, src, oloc, version)); + CopyOpRef cop(new CopyOp(ctx, obc, src, oloc, version)); copy_ops[dest] = cop; ctx->copy_op = cop; - ++ctx->obc->copyfrom_readside; + ++obc->copyfrom_readside; - _copy_some(ctx->obc, cop); + _copy_some(obc, cop); return 0; } diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index c968ad3ea2f..5f0c97b3716 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -723,7 +723,7 @@ protected: // -- copyfrom -- map copy_ops; - int start_copy(OpContext *ctx, hobject_t src, object_locator_t oloc, version_t version); + int start_copy(OpContext *ctx, ObjectContextRef obc, hobject_t src, object_locator_t oloc, version_t version); void process_copy_chunk(hobject_t oid, tid_t tid, int r); void _write_copy_chunk(CopyOpRef cop, ObjectStore::Transaction *t); void _copy_some(ObjectContextRef obc, CopyOpRef cop);