From 3b7f16ec84c781503e829e52887dbbbfdf3d4ed1 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 17 Feb 2025 23:14:34 +0300 Subject: [PATCH] os/bluestore: be less strict in main bdev label validation. 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 (cherry picked from commit 2a9c776f6aa39e8f73ed0159f3c58ad2522a114a) --- src/os/bluestore/BlueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index f0e37b4f7d7..03487084716 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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; } -- 2.39.5