diff options
author | Liu Yuan <tailai.ly@taobao.com> | 2012-04-20 17:10:56 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-20 11:42:41 +0200 |
commit | 80ccf93b884a2edab5ec62634758e942bba81b7c (patch) | |
tree | 80603fd6aa5aeb15f71b15c5b201885118c99647 /qemu-img.c | |
parent | 9eb0bfca960b8cf24fb42e017c3a6479e5676f75 (diff) |
qemu-img: let 'qemu-img convert' flush data
The 'qemu-img convert -h' advertise that the default cache mode is
'writeback', while in fact it is 'unsafe'.
This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush()
2) is needed because some backend storage doesn't have a self-flush
mechanism(for e.g., sheepdog), so we need to call bdrv_flush() to make
sure the image is really writen to the storage instead of hanging around
writeback cache forever.
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c index 6a61ca8d06..0ae543cade 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -66,8 +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', 'directsync'\n" - " and 'unsafe'\n" + " options are: 'none', 'writeback' (default, except for convert), 'writethrough',\n" + " 'directsync' and 'unsafe' (default for convert)\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" |