diff options
author | Sage Weil <sage@inktank.com> | 2013-01-15 19:27:13 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-01-15 19:27:13 -0800 |
commit | 63e33c8ad9df5fc43b5695ebc839a26a3c88487c (patch) | |
tree | e1349b8cb35c4bf0f2bba86b69d8009a29b48b70 /src/osd/ReplicatedPG.cc | |
parent | 27ad74b9efe17ec90864aa32d07ae047bad9f366 (diff) | |
download | ceph-63e33c8ad9df5fc43b5695ebc839a26a3c88487c.tar.gz |
osd: send forced scrub/repair through scrub scheduling
This marks a PG for immediate scrub or repair. Adjust the sched_scrub()
code so that we handle these PGs even when should_schedule_scrub is
false (e.g., because the load is high). When we explicitly request a
scrub or repair, we then go through the normal scrub reservation process
to avoid unduly impacting cluster performance.
This is particularly helpful on argonaut, where the final scrub
finalization step blocks writes to the PG, and overlapping scrubs can
exacerbate the problem.
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/osd/ReplicatedPG.cc')
-rw-r--r-- | src/osd/ReplicatedPG.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d6ff0d2917f..92df99778c6 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5738,7 +5738,8 @@ void ReplicatedPG::on_change() scrub_clear_state(); } else if (is_scrubbing()) { state_clear(PG_STATE_SCRUBBING); - state_clear(PG_STATE_REPAIR); + must_scrub = false; + must_repair = false; } context_registry_on_change(); @@ -6461,7 +6462,7 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) dout(10) << "_scrub" << dendl; coll_t c(info.pgid); - bool repair = state_test(PG_STATE_REPAIR); + bool repair = must_repair; const char *mode = repair ? "repair":"scrub"; // traverse in reverse order. |