mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-25 21:02:25 +00:00
Add support for opening the disk images with O_DIRECT. This allows bypassing the host's file system cache, which is useful to avoid polluting its cache and for better data integrity. This mode of operation can be enabled by adding the "direct=<bool>" parameter to the "backend" argument: ./target/debug/vhost_user_blk --backend image=test.raw,sock=/tmp/vhostblk,direct=true The "direct" parameter defaults to "false", to preserve the original behavior. Signed-off-by: Sergio Lopez <slp@redhat.com>