]> git.proxmox.com Git - qemu.git/commit - qemu-img.c
block: add cache=directsync parameter to -drive
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 4 Aug 2011 11:26:52 +0000 (12:26 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 23 Aug 2011 12:15:17 +0000 (14:15 +0200)
commit92196b2f5664d5defa778b1b24df56e2239b5e93
tree944fe6b4fb403578fdb43073ce622ef0a34befc6
parentc3993cdca39c252d65bbbcc234d8d242dc9bd693
block: add cache=directsync parameter to -drive

This patch adds -drive cache=directsync for O_DIRECT | O_SYNC host file
I/O with no disk write cache presented to the guest.

This mode is useful when guests may not be sending flushes when
appropriate and therefore leave data at risk in case of power failure.
When cache=directsync is used, write operations are only completed to
the guest when data is safely on disk.

This new mode is like cache=writethrough but it bypasses the host page
cache.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
qemu-config.c
qemu-img.c
qemu-options.hx