From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSUBk-00079Y-Ol for qemu-devel@nongnu.org; Mon, 02 Mar 2015 12:31:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSUBj-0002wz-Tt for qemu-devel@nongnu.org; Mon, 02 Mar 2015 12:31:28 -0500 Date: Mon, 2 Mar 2015 11:31:14 -0600 From: Stefan Hajnoczi Message-ID: <20150302173114.GC18644@stefanha-thinkpad.redhat.com> References: <1425066879-27326-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eRtJSFbw+EEWtPj3" Content-Disposition: inline In-Reply-To: <1425066879-27326-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3] block/vdi: Add locking for parallel requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Stefan Weil , qemu-devel@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini --eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > See https://bugs.launchpad.net/qemu/+bug/1422307 for what can go wrong > without this patch. >=20 > Cc: qemu-stable > Signed-off-by: Max Reitz > --- > 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 --eRtJSFbw+EEWtPj3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU9J5iAAoJEJykq7OBq3PIlHAIAJowqBMe3NPif+MgYvngOSGP 0FGWERHgJCudESxqtTj98mcqJzRiMUtaZUs3O6Y6z6DTcV+OBy/A/XvMnhrS7gq/ gIQ1sMu3GC/JPegMEebDcm9CTmLkvldwxD+sbI31q40Pn0VBPmaTq8FXkNkZIcR/ vAQzUaN/vfEGtMiBdlrvcnYjrGndG7PsgIjSTfp9Si2eWivJ+tbdO1pQrzkrSm7h tpn676udLIjsm/ardF7abbZl0NU+qp4JzqscK7IRrghxh53Sj2WsNo/9/uzLizAT GtlpZ/CviQnuIrXAFN0WhzjlzzB9VCVkw1h2yIjtGD2ebr4zuzZM1XWiwl2J0Q8= =Lb5b -----END PGP SIGNATURE----- --eRtJSFbw+EEWtPj3--