From c8054ac57b9e397497aba6cbb0fa94f911840ad1 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 30 Sep 2013 14:04:54 -0700 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 14 ++++---------- 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 41ca7e289e543..5e099c0853d47 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::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 c10cc0c9b453e..abee57ffe7d65 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -102,8 +102,6 @@ public: tid_t objecter_tid; - list 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; -- 2.39.5