Skip to content

Commit

Permalink
osd: make missing head non-fatal during scrub
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sage Weil committed Jan 9, 2013
1 parent 77ddf27 commit 5b12b51
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 5b12b51

Please sign in to comment.