]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::_select_auth_object: prefer a peer which did not hit a read error
authorSamuel Just <sam.just@inktank.com>
Tue, 26 Mar 2013 20:09:00 +0000 (13:09 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 1 Apr 2013 16:38:08 +0000 (09:38 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 85edc07f4fa19e3fa2d96a11b2103dfd39946afd..c598255e2bef9c6ad8dc6097c7eaf86fc8705400 100644 (file)
@@ -4258,6 +4258,14 @@ map<int, ScrubMap *>::const_iterator PG::_select_auth_object(
               << dendl;
       continue;
     }
+    if (i->second.read_error) {
+      // scrub encountered read error, probably corrupt
+      dout(10) << __func__ << ": rejecting osd " << j->first
+              << " for obj " << obj
+              << ", read_error"
+              << dendl;
+      continue;
+    }
     map<string, bufferptr>::iterator k = i->second.attrs.find(OI_ATTR);
     if (k == i->second.attrs.end()) {
       // no object info on object, probably corrupt