From: xie xingguo Date: Wed, 13 Apr 2016 01:53:48 +0000 (+0800) Subject: osd: clear requeue_scrub_on_unblock flag after requeue scrub X-Git-Tag: v10.2.0~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f30db904654f7ce74e2c4fa4b14e8e2cebc09cb3;p=ceph.git osd: clear requeue_scrub_on_unblock flag after requeue scrub 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 052d6c76d0be..cfb768343fad 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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)