]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not log undecodable bdev label as an error
authorIgor Fedotov <ifedotov@croit.io>
Fri, 17 Jan 2025 13:23:34 +0000 (16:23 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 15 Apr 2025 09:04:23 +0000 (12:04 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit a70a3ced7e1f4ba0d124550d053e54d3a320f782)

src/os/bluestore/BlueStore.cc

index a6a9fdc8c97974133302820c43a199c9cee4cb2a..04772d15624b112a9c6b7e4ab10b3b797f34f315 100644 (file)
@@ -6654,13 +6654,18 @@ int BlueStore::_read_bdev_label(
     decode(expected_crc, p);
   }
   catch (ceph::buffer::error& e) {
-    derr << __func__ << " " << path.c_str() << " data at 0x" << std::hex << disk_position
-      << std::dec << ", " << "unable to decode label " << dendl;
+    // We can still get here in non-erroneous scenarios,
+    // hence do not log that as an error
+    dout(0) << __func__ << " " << path.c_str() << " data at 0x" << std::hex << disk_position
+      << std::dec << ", " << "unable to decode label "
+      << dendl;
     return -ENOENT;
   }
   if (crc != expected_crc) {
-    derr << __func__ << " bad crc on label, expected " << expected_crc
-        << " != actual " << crc << dendl;
+    // We can still get here in non-erroneousscenarios,
+    // hence do not log that as an error
+    dout(0) << __func__ << " bad crc on label, expected " << expected_crc
+           << " != actual " << crc << dendl;
     return -EIO;
   }
   dout(10) << __func__ << " got " << *label << dendl;