From b6561a2f92b13bb1ddcd9b78e442d1548d6e3bef Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 2 Jan 2013 09:39:26 -0800 Subject: 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 --- src/osd/ReplicatedPG.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 6446717e2a5..3caa8cd4dce 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6563,10 +6563,15 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) } } 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; -- cgit v1.2.1