]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::release_op_ctx_locks: requeue in scrub queue if blocked 4902/head
authorSamuel Just <sjust@redhat.com>
Wed, 20 May 2015 23:10:02 +0000 (16:10 -0700)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Mon, 8 Jun 2015 17:49:35 +0000 (23:19 +0530)
Otherwise we can reorder an op around another op which got blocked by a
scrub which started after the first blocked on an obc.

Fixes: #11691
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit be873eb8da7b29ecefaa5a99b88de7ddcca711ee)

src/osd/ReplicatedPG.h

index da0c75b3e004c83079c128063ea536a97be81962..5b5bc23cb5c50785cc4df5dadcbe64d8c0a8f3a8 100644 (file)
@@ -852,7 +852,20 @@ protected:
        requeue_snaptrimmer_clone ||
        requeue_snaptrimmer_snapset)
       queue_snap_trim();
-    requeue_ops(to_req);
+
+    if (!to_req.empty()) {
+      assert(ctx->obc);
+      // requeue at front of scrub blocking queue if we are blocked by scrub
+      if (scrubber.write_blocked_by_scrub(ctx->obc->obs.oi.soid.get_head())) {
+       waiting_for_active.splice(
+         waiting_for_active.begin(),
+         to_req,
+         to_req.begin(),
+         to_req.end());
+      } else {
+       requeue_ops(to_req);
+      }
+    }
   }
 
   // replica ops