]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy 661/head
authorGreg Farnum <greg@inktank.com>
Mon, 30 Sep 2013 21:04:54 +0000 (14:04 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 30 Sep 2013 21:49:37 +0000 (14:49 -0700)
We never placed any ops here, and so we weren't ever requeuing any ops.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 41ca7e289e54348002e464439fa622cc35bb4d63..5e099c0853d4723009456a4f2f6f9c6912a40513 100644 (file)
@@ -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()) {
index c10cc0c9b453e050897153f9def6709c27bc3aef..abee57ffe7d657ccaf7dcfc0dd175d8272d10af1 100644 (file)
@@ -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;