From: David Zafman Date: Sat, 22 Feb 2014 21:51:03 +0000 (-0800) Subject: osd/PG: fix assert when deep repair finds no errors X-Git-Tag: v0.78~136^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1299%2Fhead;p=ceph.git osd/PG: fix assert when deep repair finds no errors If there are no deep repairs, we don't want to assert. Fixes: -1> 2014-02-21 21:13:56.393087 7f0258ff9700 0 log [INF] : 0.0 repair ok, 0 fixed 0> 2014-02-21 21:13:56.428703 7f0258ff9700 -1 osd/PG.cc: In function 'void PG::scrub_finish()' thread 7f0258ff9700 time 2014-02-21 21:13:56.393127 osd/PG.cc: 4294: FAILED assert(deep_scrub) Signed-off-by: David Zafman Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 9872edade59a..b7338bfb9ee2 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4291,7 +4291,7 @@ void PG::scrub_finish() // when every one has been fixed. if (repair) { if (scrubber.fixed == scrubber.shallow_errors + scrubber.deep_errors) { - assert(deep_scrub); + assert(deep_scrub || scrubber.deep_errors == 0); scrubber.shallow_errors = scrubber.deep_errors = 0; } else { // Deep scrub in order to get corrected error counts