From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9vxR-0001Hv-43 for qemu-devel@nongnu.org; Tue, 30 Jun 2015 09:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9vxQ-0004Aa-4W for qemu-devel@nongnu.org; Tue, 30 Jun 2015 09:52:17 -0400 Date: Tue, 30 Jun 2015 14:52:08 +0100 From: Stefan Hajnoczi Message-ID: <20150630135208.GB31899@stefanha-thinkpad.redhat.com> References: <1434537440-28236-1-git-send-email-yarygin@linux.vnet.ibm.com> <1434537440-28236-3-git-send-email-yarygin@linux.vnet.ibm.com> <87mvzm2536.fsf@blackfin.pond.sub.org> <87egky4lj4.fsf@linux.vnet.ibm.com> <878ub3xcxf.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline In-Reply-To: <878ub3xcxf.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use blk_drain() to drain IO requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Fam Zheng , qemu-block@nongnu.org, "Michael S. Tsirkin" , Ekaterina Tumanova , Alexander Yarygin , qemu-devel@nongnu.org, Christian Borntraeger , Cornelia Huck , Paolo Bonzini --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 29, 2015 at 08:10:20AM +0200, Markus Armbruster wrote: > Alexander Yarygin writes: > > Markus Armbruster writes: > > * Ignorant answer: I was told that the bdrv_drain_all()'s comment is > > obsolete and we can use bdrv_drain(). Here is a link to the old > > thread: http://marc.info/?l=3Dqemu-devel&m=3D143154211017926&w=3D2. >=20 > Kevin, Stefan, if the comment has become wrong, it needs to be redone. > Who's going to take care of it? I couldn't think of a scenario where this patch is unsafe. The danger is that the I/O code path depends on something outside the AioContext. In that case you block in aio_poll(aio_context, true) forever without making progress. The thing the I/O request depends on will never finish. Code that accesses multiple BDSes puts them into the same AioContext, so this should not be a problem in practice. Stefan --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVkp8IAAoJEJykq7OBq3PIHXwH/jrnIMGlperAOzGdFZdlljPR rk3vhrS0xNpkev+0WC/258VID9Cp+C0SI11AAyYVnAa8lxez6EHKOImfYyun8iBd c6V/U2hlIiEJsy0mkeBw96vyHjYlW5ndJWdTXUTKdn3vOSZk2EnxIhmzpWNhY6Qg KltBFeeTwtl7m+lkjX39HJhnvkEZijwGe/yxXArCmx7GAxAJYeG8Z1RISI664q++ Ey6IHYmPNvH0khDhchAxVNGi7uJrdvP7+QSTq/h8tgWcaKD1iaDJ+eCG0GDKH+gF +zCQytTBATKU++PtaNyRbZrBLupCAoh1T5F4tPuh2QHF+JcWoKFyn5EhbeNH47E= =887f -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu--