]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: be less strict in main bdev label validation.
authorIgor Fedotov <ifedotov@croit.io>
Mon, 17 Feb 2025 20:14:34 +0000 (23:14 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 15 Apr 2025 09:04:23 +0000 (12:04 +0300)
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)

src/os/bluestore/BlueStore.cc

index f0e37b4f7d70cfd194afc13d56d1a163255b3b15..0348708471685616e85e29f51dbb1a962d32f543 100644 (file)
@@ -6907,7 +6907,7 @@ int BlueStore::_check_main_bdev_label()
         ++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;
     }