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>
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()