]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/blk: fix block_device_t return if no aio libs present 42791/head
authorDeepika Upadhyay <dupadhya@redhat.com>
Mon, 16 Aug 2021 14:04:33 +0000 (19:34 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Mon, 16 Aug 2021 14:04:33 +0000 (19:34 +0530)
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>
src/blk/BlockDevice.cc

index 25fdc20f036e19e0e223f65911406cc76bee44a9..fd07e443c1365f470861edef5be391ebafb0936b 100644 (file)
@@ -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