diff options
author | Greg Farnum <greg@inktank.com> | 2013-09-30 15:36:27 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-10-01 13:29:23 -0700 |
commit | 4f5b317714928a48b3cece80f7b99e52613e6944 (patch) | |
tree | 94875bcab2cace22e75538e09164740d8355356f | |
parent | dbfd4781a20302af506847a78007e029e34856b0 (diff) | |
download | ceph-4f5b317714928a48b3cece80f7b99e52613e6944.tar.gz |
ReplicatedPG: copy: do not use an OpContext in _copy_some
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 10 | ||||
-rw-r--r-- | 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 7d4c79b9553..846669d58db 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4397,14 +4397,14 @@ int ReplicatedPG::start_copy(OpContext *ctx, ctx->copy_op = cop; ++ctx->obc->copyfrom_readside; - _copy_some(ctx, cop); + _copy_some(ctx->obc, cop); return 0; } -void ReplicatedPG::_copy_some(OpContext *ctx, CopyOpRef cop) +void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop) { - dout(10) << __func__ << " " << ctx << " " << cop << dendl; + dout(10) << __func__ << " " << obc << " " << cop << dendl; ObjectOperation op; if (cop->version) { op.assert_version(cop->version); @@ -4418,7 +4418,7 @@ void ReplicatedPG::_copy_some(OpContext *ctx, CopyOpRef cop) &cop->data, &cop->omap, &cop->rval); - C_Copyfrom *fin = new C_Copyfrom(this, ctx->obs->oi.soid, + C_Copyfrom *fin = new C_Copyfrom(this, obc->obs.oi.soid, get_last_peering_reset()); osd->objecter_lock.Lock(); tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op, @@ -4479,7 +4479,7 @@ void ReplicatedPG::process_copy_chunk(hobject_t oid, tid_t tid, int r) repop->put(); dout(10) << __func__ << " fetching more" << dendl; - _copy_some(ctx, cop); + _copy_some(ctx->obc, cop); return; } diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index abee57ffe7d..f6898d80f13 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -725,7 +725,7 @@ protected: int start_copy(OpContext *ctx, 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(OpContext *ctx, CopyOpRef cop); + void _copy_some(ObjectContextRef obc, CopyOpRef cop); int finish_copy(OpContext *ctx); void cancel_copy(CopyOpRef cop); void cancel_copy_ops(); |