From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBV8g-0006pz-4y for qemu-devel@nongnu.org; Fri, 10 Jun 2016 18:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBV8e-0003HR-2w for qemu-devel@nongnu.org; Fri, 10 Jun 2016 18:42:53 -0400 References: <1465595961-4762-1-git-send-email-jsnow@redhat.com> From: Eric Blake Message-ID: <575B4268.7080501@redhat.com> Date: Fri, 10 Jun 2016 16:42:48 -0600 MIME-Version: 1.0 In-Reply-To: <1465595961-4762-1-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BvT5TOO6216ht6DBdDqplcbRMPTsJ50SG" Subject: Re: [Qemu-devel] [PATCH] block-backend: allow flush on devices with open tray List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BvT5TOO6216ht6DBdDqplcbRMPTsJ50SG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/10/2016 03:59 PM, John Snow wrote: > If a device still has an attached BDS because the medium has not yet > been removed, we will be unable to migrate to a new host because > blk_flush will return an error for that backend. >=20 > Replace the call to blk_is_available to blk_is_inserted to weaken > the check and allow flushes from the backend to work, while still > disallowing flushes from the frontend/device model to work. >=20 > This fixes a regression present in 2.6.0 caused by the following commit= : > fe1a9cbc339bb54d20f1ca4c1e8788d16944d5cf > block: Move some bdrv_*_all() functions to BB >=20 > Signed-off-by: John Snow > --- > block/block-backend.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Worth testsuite coverage to prevent future regressions? At any rate, Reviewed-by: Eric Blake >=20 > diff --git a/block/block-backend.c b/block/block-backend.c > index 34500e6..d1e875e 100644 > --- a/block/block-backend.c > +++ b/block/block-backend.c > @@ -1122,7 +1122,7 @@ int blk_co_flush(BlockBackend *blk) > =20 > int blk_flush(BlockBackend *blk) > { > - if (!blk_is_available(blk)) { > + if (!blk_is_inserted(blk)) { > return -ENOMEDIUM; > } > =20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BvT5TOO6216ht6DBdDqplcbRMPTsJ50SG 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/ iQEcBAEBCAAGBQJXW0JoAAoJEKeha0olJ0Nqne8IAJdJq3DJZGgnraXHOyL8u1+L i998iY4qcpbC0uMMutB7vae5j9tE51gZjlXZk9gCWvDL7zfppeEIe3Ca2EB+XB0s MJfIYfDP03thpluwiSI0Y+RXa+3THAX3/EQmqD5DP6WuQiepAmIOwxhh+okviPJL +Hkqy7zT2pyR6GF8jCAx58fDbhNGvPTOi/vOo5pwEvvpvGD/+SRCTl0RnkKJu+tQ ooktuiStOxY5iwHM6+9XcafF3CIsNr8HR9h238OtWlffFXiXbKhqfG0JOKR/HgYX nz+1p88b2h7M3eisjI5LCDeCEP7dyXDLWs6fjZ0iMHecHhJXoToz5MoR9kO1bmI= =78EL -----END PGP SIGNATURE----- --BvT5TOO6216ht6DBdDqplcbRMPTsJ50SG--