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>
Reviewed-by: Samuel Just <sam.just@inktank.com>
}
} 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;