diff options
author | Deepika Upadhyay <dupadhya@redhat.com> | 2021-08-16 16:04:33 +0200 |
---|---|---|
committer | Deepika Upadhyay <dupadhya@redhat.com> | 2021-08-16 16:04:33 +0200 |
commit | ee33b3f19c6859a044bbb1fa73731f3ddb834d32 (patch) | |
tree | 63cb7bcb5872156f926e6b3019c7f9d036427e84 /src/blk | |
parent | Merge PR #42318 into master (diff) | |
download | ceph-ee33b3f19c6859a044bbb1fa73731f3ddb834d32.tar.xz ceph-ee33b3f19c6859a044bbb1fa73731f3ddb834d32.zip |
src/blk: fix block_device_t return if no aio libs present
In cases, when no libaio are present in the system, compilation fails,
return block_device_t as unknown
fixes: https://tracker.ceph.com/issues/50947#note-1
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
Diffstat (limited to 'src/blk')
-rw-r--r-- | src/blk/BlockDevice.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blk/BlockDevice.cc b/src/blk/BlockDevice.cc index 25fdc20f036..fd07e443c13 100644 --- a/src/blk/BlockDevice.cc +++ b/src/blk/BlockDevice.cc @@ -118,8 +118,11 @@ BlockDevice::detect_device_type(const std::string& path) return block_device_t::hm_smr; } #endif - +#if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO) return block_device_t::aio; +#else + return block_device_t::unknown; +#endif } BlockDevice::block_device_t |