Skip to content

Commit

Permalink
Merge pull request #4192 from aliang123/2919
Browse files Browse the repository at this point in the history
storage_volume: set direct=on for image_aio=native
  • Loading branch information
XueqiangWei authored Nov 13, 2024
2 parents a806781 + f691b4e commit 689b087
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions provider/virt_storage/storage_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ 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":
self.protocol.set_param("cache.direct", "on")
self.protocol.set_param("cache.no-flush", "off")

def info(self):
out = dict()
Expand Down

0 comments on commit 689b087

Please sign in to comment.