mirror of
https://github.com/ceph/ceph
synced 2025-01-03 17:42:36 +00:00
osd/ReplicatedPG: handle snapdir properly during scrub
Handle snapdir similarly to how head is treated when updating the next_clone info. Also, add a warning when we have a snapdir object and head_exists == true (the converse of the existing check). Fixes: #7937 Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
87b08b23c3
commit
c2e5a42874
@ -11176,10 +11176,16 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
|
||||
++scrubber.shallow_errors;
|
||||
}
|
||||
|
||||
if (soid.snap == CEPH_NOSNAP) {
|
||||
if (!snapset.head_exists) {
|
||||
if (soid.snap == CEPH_NOSNAP || soid.snap == CEPH_SNAPDIR) {
|
||||
if (soid.snap == CEPH_NOSNAP && !snapset.head_exists) {
|
||||
osd->clog.error() << mode << " " << info.pgid << " " << soid
|
||||
<< " snapset.head_exists=false, but object exists";
|
||||
<< " snapset.head_exists=false, but head exists";
|
||||
++scrubber.shallow_errors;
|
||||
continue;
|
||||
}
|
||||
if (soid.snap == CEPH_SNAPDIR && snapset.head_exists) {
|
||||
osd->clog.error() << mode << " " << info.pgid << " " << soid
|
||||
<< " snapset.head_exists=true, but snapdir exists";
|
||||
++scrubber.shallow_errors;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user