]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix assert when deep repair finds no errors 1299/head
authorDavid Zafman <david.zafman@inktank.com>
Sat, 22 Feb 2014 21:51:03 +0000 (13:51 -0800)
committerSage Weil <sage@inktank.com>
Sat, 22 Feb 2014 21:51:18 +0000 (13:51 -0800)
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 <david.zafman@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc

index 9872edade59af7c3ff23f203d18421c874d6943e..b7338bfb9ee2dcdf99bd46e4f2f56ebec77a04f3 100644 (file)
@@ -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