weizhouapache commented on code in PR #6399:
URL: https://github.com/apache/cloudstack/pull/6399#discussion_r878112263
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -2958,11 +2985,27 @@ private KVMPhysicalDisk
getPhysicalDiskPrimaryStore(PrimaryDataStoreTO primaryDa
protected void setDiskIoDriver(DiskDef disk) {
if (getHypervisorLibvirtVersion() >=
HYPERVISOR_LIBVIRT_VERSION_SUPPORTS_IO_URING
&& getHypervisorQemuVersion() >=
HYPERVISOR_QEMU_VERSION_SUPPORTS_IO_URING
- &&
AgentPropertiesFileHandler.getPropertyValue(AgentProperties.ENABLE_IO_URING)) {
+ && isIoUringEnabled()) {
disk.setIoDriver(DiskDef.IoDriver.IOURING);
}
}
+ /**
+ * IO_URING supported if the property 'enable.io.uring' is set to true OR
it is supported by qemu
+ */
+ private boolean isIoUringEnabled() {
+ Boolean propertyValue =
AgentPropertiesFileHandler.getPropertyValue(AgentProperties.ENABLE_IO_URING);
+ return BooleanUtils.isTrue(propertyValue) || isBaseOsUbuntu() ||
isIoUringSupportedByQemu();
Review Comment:
In my opiniom, the logic is
If enable.io.uring is true, enable io uring.
If enable.io.uring is false, disable io uring.
If it is not set, determine by ldd
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]