]> git-server-git.apps.pok.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, 11 Mar 2025 09:20:50 +0000 (12:20 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit a70a3ced7e1f4ba0d124550d053e54d3a320f782)

src/os/bluestore/BlueStore.cc

index 08ee80123c5e250805259825eb026278d96d0047..97f65f215c725e8772c0233958bd07ff733519ef 100644 (file)
@@ -5494,14 +5494,18 @@ int BlueStore::_read_bdev_label(CephContext* cct, const string &path,
     decode(expected_crc, p);
   }
   catch (ceph::buffer::error& e) {
-    derr << __func__ << " unable to decode label at offset " << p.get_off()
-        << ": " << e.what()
-        << dendl;
+    // We can still get here in non-erroneous scenarios,
+    // hence do not log that as an error
+    dout(0) << __func__ << " " << path.c_str() << ", "
+      << "unable to decode label: " << e.what()
+      << 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;