On Fri, Feb 27, 2015 at 02:54:39PM -0500, Max Reitz wrote:
> When allocating a new cluster, the first write to it must be the one
> doing the allocation, because that one pads its write request to the
> cluster size; if another write to that cluster is executed before it,
> that write will be overwritten due to the padding.
> 
> See https://bugs.launchpad.net/qemu/+bug/1422307 for what can go wrong
> without this patch.
> 
> Cc: qemu-stable <qemu-sta...@nongnu.org>
> Signed-off-by: Max Reitz <mre...@redhat.com>
> ---
> v3: Hopefully finally found the real issue which causes the problems
>     described in the bug report; at least it sounds very reasonable and
>     I can no longer reproduce any of the issues described there.
>     Thank you, Paolo and Stefan!
> ---
>  block/vdi.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
I think this is overkill but let's merge it since the patch has been
written.  A simple s->lock for I/O operations would have been fine since
this block driver was never designed for parallel I/O.

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: pgpHiWQdKSEnh.pgp
Description: PGP signature

Reply via email to