diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-08-04 12:26:52 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-23 14:15:17 +0200 |
commit | 92196b2f5664d5defa778b1b24df56e2239b5e93 (patch) | |
tree | 944fe6b4fb403578fdb43073ce622ef0a34befc6 /qemu-img.c | |
parent | c3993cdca39c252d65bbbcc234d8d242dc9bd693 (diff) |
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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c index 5e203c231f..10a3a8bb52 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -66,7 +66,8 @@ static void help(void) " 'filename' is a disk image filename\n" " 'fmt' is the disk image format. It is guessed automatically in most cases\n" " 'cache' is the cache mode used to write the output disk image, the valid\n" - " options are: 'none', 'writeback' (default), 'writethrough' and 'unsafe'\n" + " options are: 'none', 'writeback' (default), 'writethrough', 'directsync'\n" + " and 'unsafe'\n" " 'size' is the disk image size in bytes. Optional suffixes\n" " 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n" " and T (terabyte, 1024G) are supported. 'b' is ignored.\n" |