From: Sage Weil Date: Wed, 2 Jan 2013 17:39:26 +0000 (-0800) Subject: osd: make missing head non-fatal during scrub X-Git-Tag: v0.57~235 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b12b514b047a8a46cc5549bd94b398289b9b5f6;p=ceph.git osd: make missing head non-fatal during scrub If we encounter a scrub without a preceeding head, warn instead of crashing. Note that this is still something we can't repair. See #3705. Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index cbae003827c6..e8a68fed512e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7108,10 +7108,15 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap) } } else if (soid.snap) { // it's a clone - assert(head != hobject_t()); - stat.num_object_clones++; + if (head == hobject_t()) { + osd->clog.error() << mode << " " << info.pgid << " " << soid + << " found clone without head"; + ++errors; + continue; + } + if (soid.snap != *curclone) { osd->clog.error() << mode << " " << info.pgid << " " << soid << " expected clone " << *curclone;