From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adfTr-0001yT-Qf for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:52:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adfTm-0008Sj-Vb for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:52:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adfTm-0008SZ-QC for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:52:50 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id DCC7BA37BB for ; Wed, 9 Mar 2016 14:52:49 +0000 (UTC) Date: Wed, 9 Mar 2016 14:52:47 +0000 From: Stefan Hajnoczi Message-ID: <20160309145247.GA4399@stefanha-x1.localdomain> References: <1457431876-8475-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <1457431876-8475-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Revert "qed: Implement .bdrv_drain" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Fam Zheng --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 08, 2016 at 10:11:16AM +0000, Stefan Hajnoczi wrote: > This reverts commit df9a681dc9ad41c9cdeb9ecc5d060ba9abd27e01. >=20 > Note that commit df9a681dc9ad41c9cdeb9ecc5d060ba9abd27e01 included some > unrelated hunks, possibly due to a merge failure or an overlooked > squash. This only reverts the qed .bdrv_drain() implementation. >=20 > The qed .bdrv_drain() implementation is unsafe and can lead to a double > request completion. >=20 > Paolo Bonzini reports: > "The problem is that bdrv_qed_drain calls qed_plug_allocating_write_reqs > unconditionally, but this is not correct if an allocating write is > queued. In this case, qed_unplug_allocating_write_reqs will restart the > allocating write and possibly cause it to complete. The aiocb however > is still in use for the L2/L1 table writes, and will then be completed > again as soon as the table writes are stable." >=20 > For QEMU 2.6 we can simply revert this commit. A full solution for the > qed need check timer may be added if the bdrv_drain() implementation is > extended. >=20 > Reported-by: Paolo Bonzini > Signed-off-by: Stefan Hajnoczi > --- > block/qed.c | 13 ------------- > 1 file changed, 13 deletions(-) >=20 > Passes ./check -qed. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW4Di/AAoJEJykq7OBq3PIPYQH/21PiQVVjc6JsZvlEfjmzHM2 frFLGtJx7fXKrveLR5IujRPxDRFevJTjj82UhbtbEuUjKbCsdSh2N0cOgGCGMNji w7mYsFtZPu0XvD+uZVy96H+1UG9wTdoct9CSaWvs1DFE1CYqGgGMWJtGIJ5tVZz5 DxnpsTywdwmtOFEZhxuqr2v/vtSlp+x4AoR3lkb8XBqsjbkK0h4pgmibtZlmsr3T zWjxXRvzxejns+ILTVAs+fgBW6IxXq22FoAdIrORKRWAJ28DsxUni4fD6ezNkT9B DukaD6Qe8Mq9ix2g1f8DJAfriUKiTbgFGHtkHBoRXeyY2j8LQVxGs31UOapgNjs= =0FkK -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--