diff options
author | Greg Farnum <greg@inktank.com> | 2013-09-30 14:04:54 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-09-30 14:49:37 -0700 |
commit | c8054ac57b9e397497aba6cbb0fa94f911840ad1 (patch) | |
tree | 25fb64f049cb8b669fd01e44b314b1a93180ea1f | |
parent | 7bf8cb7d9fa0df8440346237978197281b0ba4b5 (diff) | |
download | ceph-c8054ac57b9e397497aba6cbb0fa94f911840ad1.tar.gz |
ReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy
We never placed any ops here, and so we weren't ever requeuing any ops.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 14 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 4 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 41ca7e289e5..5e099c0853d 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4580,19 +4580,13 @@ void ReplicatedPG::cancel_copy(CopyOpRef cop) delete ctx; } -void ReplicatedPG::requeue_cancel_copy_ops(bool requeue) +void ReplicatedPG::cancel_copy_ops() { dout(10) << __func__ << dendl; for (map<hobject_t,CopyOpRef>::iterator p = copy_ops.begin(); p != copy_ops.end(); copy_ops.erase(p++)) { - // requeue initiating copy *and* any subsequent waiters - CopyOpRef cop = p->second; - if (requeue) { - cop->waiting.push_front(cop->ctx->op); - requeue_ops(cop->waiting); - } - cancel_copy(cop); + cancel_copy(p->second); } } @@ -7332,7 +7326,7 @@ void ReplicatedPG::on_shutdown() deleting = true; unreg_next_scrub(); - requeue_cancel_copy_ops(false); + cancel_copy_ops(); apply_and_flush_repops(false); context_registry_on_change(); @@ -7369,7 +7363,7 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) context_registry_on_change(); - requeue_cancel_copy_ops(is_primary()); + cancel_copy_ops(); // requeue object waiters if (is_primary()) { diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index c10cc0c9b45..abee57ffe7d 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -102,8 +102,6 @@ public: tid_t objecter_tid; - list<OpRequestRef> waiting; - object_copy_cursor_t cursor; uint64_t size; utime_t mtime; @@ -730,7 +728,7 @@ protected: void _copy_some(OpContext *ctx, CopyOpRef cop); int finish_copy(OpContext *ctx); void cancel_copy(CopyOpRef cop); - void requeue_cancel_copy_ops(bool requeue=true); + void cancel_copy_ops(); friend class C_Copyfrom; |