[Top][All Lists]

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

Re: [Qemu-block] [PATCH v3] block/vdi: Add locking for parallel requests

From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v3] block/vdi: Add locking for parallel requests
Date: Mon, 2 Mar 2015 11:31:14 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> 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 <address@hidden>

Attachment: pgpRxxi1RssVl.pgp
Description: PGP signature

reply via email to

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