From c6c787b11bb55be8c8d2ca2e09d44b67d7f2fcf8 Mon Sep 17 00:00:00 2001 From: Abutalib Aghayev Date: Wed, 26 Aug 2020 09:37:31 -0400 Subject: [PATCH] os/bluestore: Remove logging macros from a static function to enable compilation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The code will not compile with the following error: invalid use of member ‘BlockDevice::cct’ in static member function Unfortunately, these pass Ceph unit tests because libzbc is not installed on testing machines. Signed-off-by: Abutalib Aghayev --- src/blk/zoned/HMSMRDevice.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/blk/zoned/HMSMRDevice.cc b/src/blk/zoned/HMSMRDevice.cc index 835097243164..60a2e44a525c 100644 --- a/src/blk/zoned/HMSMRDevice.cc +++ b/src/blk/zoned/HMSMRDevice.cc @@ -78,14 +78,7 @@ HMSMRDevice::HMSMRDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, aio_ bool HMSMRDevice::support(const std::string& path) { - int r = zbc_device_is_zoned(path.c_str(), false, nullptr); - if (r == 1) { - return true; - } else if (r < 0) { - derr << __func__ << " zbc_device_is_zoned(" << path << ") failed: " - << cpp_strerror(r) << dendl; - } - return false; + return zbc_device_is_zoned(path.c_str(), false, nullptr) == 1; } int HMSMRDevice::_lock() -- 2.47.3