]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: only log scrub errors (not ok's)
authorSage Weil <sage.weil@dreamhost.com>
Mon, 11 Apr 2011 16:36:25 +0000 (09:36 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 11 Apr 2011 16:36:25 +0000 (09:36 -0700)
Otherwise we fill up the error log with "foo is ok!" messages.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc

index fbd9779b812e3bb41b0e694c661e3482f60ca49a..be99bc61bb9138b7b8f13464f335f3129a4404c8 100644 (file)
@@ -3406,8 +3406,6 @@ bool PG::_compare_scrub_objects(ScrubMap::object &auth,
       errorstream << "extra attr " << i->first;
     }
   }
-  if (ok)
-    errorstream << " is ok!";
   return ok;
 }
 
@@ -3442,14 +3440,14 @@ void PG::_compare_scrubmaps(const map<int,ScrubMap*> &maps,
          auth = j;
        } else {
          // Compare 
-         errorstream << info.pgid << " osd" << acting[j->first]
-                     << ": soid " << *k;
+         stringstream ss;
          if (!_compare_scrub_objects(auth->second->objects[*k],
                                      j->second->objects[*k],
-                                     errorstream)) {
+                                     ss)) {
            cur_inconsistent.insert(j->first);
+           errorstream << info.pgid << " osd" << acting[j->first]
+                       << ": soid " << *k << ss.str() << std::endl;
          }
-         errorstream << std::endl;
        }
       } else {
        cur_missing.insert(j->first);