From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4x7R-0005YQ-Gi for qemu-devel@nongnu.org; Mon, 23 May 2016 17:10:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4x7P-00047a-C7 for qemu-devel@nongnu.org; Mon, 23 May 2016 17:10:32 -0400 References: <1464022515-11390-1-git-send-email-kwolf@redhat.com> <1464022515-11390-3-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <574371BF.9000808@redhat.com> Date: Mon, 23 May 2016 15:10:23 -0600 MIME-Version: 1.0 In-Reply-To: <1464022515-11390-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0pOBlfmOiEHDQ9uTFfcScVpg294sTrV1f" Subject: Re: [Qemu-devel] [PATCH 2/4] block: Make bdrv_drain() use bdrv_drained_begin/end() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0pOBlfmOiEHDQ9uTFfcScVpg294sTrV1f Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/23/2016 10:55 AM, Kevin Wolf wrote: > Until now, bdrv_drained_begin() used bdrv_drain() internally to drain > the queue. This is kind of backwards and caused quiescing code to be > duplicated because bdrv_drained_begin() had to ensure that no new > requests come in even after bdrv_drain() returns, whereas bdrv_drain() > had to have them because it could be called from other places. >=20 > Instead move the bdrv_drain() code to bdrv_drained_begin() and make > bdrv_drain() a simple wrapper around bdrv_drained_begin/end(). >=20 > Signed-off-by: Kevin Wolf > --- > block/io.c | 69 ++++++++++++++++++++++++++++++------------------------= -------- > 1 file changed, 33 insertions(+), 36 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0pOBlfmOiEHDQ9uTFfcScVpg294sTrV1f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXQ3G/AAoJEKeha0olJ0NqQjQIAI+t2nDKuHejMRXizVVOU8EB c/wAdsgo2Wp6wI6PN8UQKGU4tGtNm0oBNOipDrVxk94U2yUmQLLFTwtxkw3n1Axp nGYynBk0oL6H9a6p2Mx197v3zqON/mG4OPlfzRZYPBRHsc4E1Fsd2gUWjKJtlXM3 pCuc+3H7n2yu6A3FAQxU3QMFBhSvp5ySVvALjrIOMqZEWgq32hRHfY6weACTgOzd evEF98nd7fAdvwUf6hr5L1dxKTy3xFYxokvrCbREt3ELdDslxHt6+A00ZhHuidYy WdYCSmOYN1hgBYxOlMOhmJ8vgA4MmBht/f/idYguTGlprG+xCqHX1gPIYK4jDwU= =0O12 -----END PGP SIGNATURE----- --0pOBlfmOiEHDQ9uTFfcScVpg294sTrV1f--