From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcyR9-0008Da-8T for qemu-devel@nongnu.org; Fri, 18 Sep 2015 12:23:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcyR8-0001Oj-IV for qemu-devel@nongnu.org; Fri, 18 Sep 2015 12:22:59 -0400 References: <1442589793-7105-1-git-send-email-mreitz@redhat.com> <1442589793-7105-10-git-send-email-mreitz@redhat.com> From: Eric Blake Message-ID: <55FC3A5C.2060207@redhat.com> Date: Fri, 18 Sep 2015 10:22:52 -0600 MIME-Version: 1.0 In-Reply-To: <1442589793-7105-10-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="obnvd3MfTQvrXWXPfBB9NMWsa4JCWDPHV" Subject: Re: [Qemu-devel] [PATCH v5 09/38] block: Invoke change media CB before NULLing drv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Alberto Garcia , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --obnvd3MfTQvrXWXPfBB9NMWsa4JCWDPHV Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/18/2015 09:22 AM, Max Reitz wrote: > In order to handle host device passthrough, some guest device models > may call blk_is_inserted() to check whether the medium is inserted on > the host, when checking the guest tray status. >=20 > This tray status is inquired by blk_dev_change_media_cb(); because > bdrv_is_inserted() (invoked by blk_is_inserted()) always returns 0 for Stale comment - you just fixed bdrv_is_inserted() to return false rather than 0 in commit 5/38. > BDS with drv set to NULL, blk_dev_change_media_cb() should therefore be= > called before drv is set to NULL. >=20 > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Alberto Garcia > --- > block.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) R-b still stands. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --obnvd3MfTQvrXWXPfBB9NMWsa4JCWDPHV 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/ iQEcBAEBCAAGBQJV/DpcAAoJEKeha0olJ0NqJhIIAJpzhcq66NMvJxpKt4Fm7FzZ MpK0Nm89iQux53xdz6jXxfPpHmbPWbeWIbZLtoC1OxhLRkHwvCrg+/RD+vf5PK70 MdFW5WR1WNQ3rikpsDVWJqF8OzdIF0eovjVpW8D1GHK1qTdKt7Ycggupc+MyNmYu upQHM+baQKAJGtSRL7i7jnz3kXjotRhIFctWOgwABfCHfL8Nf2A/lfuD4HpU+Wwo tYBXUjL4rU/VCu6xU0NKYukKzvbXKAj0dmRcIoZgJArr4vB9YL8bzQ9QSeRs8nzz AU9RYsDkP4SE0IDDx/BMdD2jI2caG+m5FxwZ+kaq7jnDuufTwzc/JT9QepKWru8= =OoUK -----END PGP SIGNATURE----- --obnvd3MfTQvrXWXPfBB9NMWsa4JCWDPHV--