From 51d47a5f088968e67c728fb3fc9ebffe896fea96 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Fri, 17 Jan 2025 16:23:34 +0300 Subject: [PATCH] os/bluestore: do not log undecodable bdev label as an error Signed-off-by: Igor Fedotov (cherry picked from commit a70a3ced7e1f4ba0d124550d053e54d3a320f782) --- src/os/bluestore/BlueStore.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 08ee80123c5..97f65f215c7 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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; -- 2.39.5