]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear requeue_scrub_on_unblock flag after requeue scrub 8570/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 13 Apr 2016 01:53:48 +0000 (09:53 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 13 Apr 2016 03:12:57 +0000 (11:12 +0800)
We'd better clear requeue_scrub_on_unblock flag after successfully
requeuing scrub, this is for:
  1. if a newly initiated scrub is blocked by objectcontext again,
     reset requeue_scrub_on_unblock to true will be satisfied enough
     to meet such an appeal.
  2. so we don't push pg to the scrub queue when we don't want to
     by accident.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/ReplicatedPG.cc

index 052d6c76d0be4b8c10e74d420daf8258189da64d..cfb768343fadc3a6c2d62f7abaf5d0eb792ec3a3 100644 (file)
@@ -9288,8 +9288,10 @@ void ReplicatedPG::kick_object_context_blocked(ObjectContextRef obc)
     objects_blocked_on_snap_promotion.erase(i);
   }
 
-  if (obc->requeue_scrub_on_unblock)
+  if (obc->requeue_scrub_on_unblock) {
+    obc->requeue_scrub_on_unblock = false;
     requeue_scrub();
+  }
 }
 
 SnapSetContext *ReplicatedPG::create_snapset_context(const hobject_t& oid)