]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Remove logging macros from a static function to enable
authorAbutalib Aghayev <agayev@cs.cmu.edu>
Wed, 26 Aug 2020 13:37:31 +0000 (09:37 -0400)
committerAbutalib Aghayev <agayev@cs.cmu.edu>
Wed, 26 Aug 2020 13:37:31 +0000 (09:37 -0400)
compilation.

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 <agayev@cs.cmu.edu>
src/blk/zoned/HMSMRDevice.cc

index 83509724316499baff181a5feba55176df001936..60a2e44a525c8a4eb6381340cc7a21337a212f2d 100644 (file)
@@ -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()