diff --git a/provider/virt_storage/storage_volume.py b/provider/virt_storage/storage_volume.py index c4350c1b6b..2a79b65717 100644 --- a/provider/virt_storage/storage_volume.py +++ b/provider/virt_storage/storage_volume.py @@ -191,6 +191,12 @@ def refresh_protocol_by_params(self, params): discard = params.get("image_discard_request", "unmap") self.protocol.set_param("auto-read-only", auto_readonly) self.protocol.set_param("discard", discard) + # image_aio:native requires cache.direct:on + if params.get("image_aio") == "native": + direct = params.get("image_cache_direct", "on") + no_flush = params.get("image_cache_no_flush", "off") + self.protocol.set_param("cache.direct", direct) + self.protocol.set_param("cache.no-fulsh", no_flush) def info(self): out = dict()