summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-01-02 09:39:26 -0800
committerSage Weil <sage@inktank.com>2013-01-15 19:21:09 -0800
commitb6561a2f92b13bb1ddcd9b78e442d1548d6e3bef (patch)
tree12ad46ffe21daa9d98602ea18e99aeaec4edddda
parent830b8ffa2e53fde37b74de12a053e037ff3f15b0 (diff)
downloadceph-b6561a2f92b13bb1ddcd9b78e442d1548d6e3bef.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc9
1 files changed, 7 insertions, 2 deletions
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;