From: Sage Weil Date: Sun, 12 Feb 2012 05:15:11 +0000 (-0800) Subject: osd: emit useful scrub error on missing clone X-Git-Tag: v0.42~17^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=053dc33c524d534600d8fa3e36ba6f2da8f9ef73;p=ceph.git osd: emit useful scrub error on missing clone Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index e42c317af072..91fab1074810 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5858,6 +5858,7 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) else { curclone = snapset.clones.rbegin(); head = p->first; + dout(20) << " snapset " << snapset << dendl; } // subtract off any clone overlap @@ -5916,7 +5917,12 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) stat.num_object_clones++; - assert(soid.snap == *curclone); + if (soid.snap != *curclone) { + osd->clog.error() << mode << " " << info.pgid << " " << soid + << " expected clone " << *curclone; + ++errors; + assert(soid.snap == *curclone); + } assert(p->second.size == snapset.clone_size[*curclone]);