This eliminates treating as an error the case when valid bdev label(s)
exists at location(s) beyond the size in bdev label.
This is effectively not an error but _check_main_bdev_label() returns an
error in this case. Which is undetectable by fsck and unrecoverable by repair.
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit
2a9c776f6aa39e8f73ed0159f3c58ad2522a114a)
++valid_locations;
}
}
- if (valid_locations != bdev_label_valid_locations.size()) {
+ if (valid_locations > bdev_label_valid_locations.size()) {
derr << __func__ << " not all labels read properly" << dendl;
return -EIO;
}