qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual adv


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise
Date: Wed, 11 Apr 2012 09:49:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Am 10.04.2012 20:10, schrieb Liu Yuan:
> From: Liu Yuan <address@hidden>
> 
> The 'qemu-img convert -h' advertise that the default cache mode is
> 'writeback', while in fact it is 'unsafe'.
> 
> This patch 1) changes the cache mode as 'writeback' and 2) explicitly
> calls bdrv_flush() to flush the dirty bits.
> 
> 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 <address@hidden>

I don't agree with this patch. If the documentation says that qemu-img
always uses writeback, then the documentation must be fixed.

We really don't care about flushes during an image conversion. It should
just go as fast as it can. If any error happens in the middle, you'll
have to throw the image away anyway, because it contains only half of
what you need. So not having flushed doesn't really make any difference.

As soon as a guest begins using the image with data that we really care
about, it's probably running in a VM with non-unsafe mode, and then it
gets flushed.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]