From af72ad93325373ddfbed7aec60adbb2c9aabeb4c 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 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index a6a9fdc8c9797..04772d15624b1 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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; -- 2.39.5