From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBew-0007gX-8H for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:18:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGBes-0002Fg-4M for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:18:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBer-0002Fc-T4 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:18:42 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0RJIf1m015410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 27 Jan 2015 14:18:41 -0500 Message-ID: <54C7E490.4060005@redhat.com> Date: Tue, 27 Jan 2015 12:18:40 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422288204-29271-1-git-send-email-mreitz@redhat.com> <1422288204-29271-8-git-send-email-mreitz@redhat.com> In-Reply-To: <1422288204-29271-8-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OpxMvKdplLxSdiAokh9ctIj8EN2ugShvs" Subject: Re: [Qemu-devel] [PATCH 07/50] block: Make bdrv_is_inserted() recursive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Jeff Cody , Markus Armbruster , Stefan Hajnoczi , john@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OpxMvKdplLxSdiAokh9ctIj8EN2ugShvs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/26/2015 09:02 AM, Max Reitz wrote: > If bdrv_is_inserted() is called on the top level BDS, it should make > sure all nodes in the BDS tree are actually inserted. >=20 > Signed-off-by: Max Reitz > --- > block.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) >=20 > + return (!drv->bdrv_is_inserted || drv->bdrv_is_inserted(bs)) && > + (!bs->file || bdrv_is_inserted(bs->file)) && > + (!bs->backing_hd || bdrv_is_inserted(bs->backing_hd)= ); Hopefully we never allow ejecting a backing file while the active file is still present, but that doesn't affect the correctness of this patch. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --OpxMvKdplLxSdiAokh9ctIj8EN2ugShvs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUx+SQAAoJEKeha0olJ0NqxHoIAJOSPiHqlcfvrVNUCCkvs/Rp kG/iVARzkzC4/rQw/JA0XfAEl7a/Ww8rCse0Y96BXIR9AFIYShXFUqV70tx7++6O YZWffAe1CZc7SkIQ5Y4aTwiE6VlTfnO8EREQQM8dXMdgDUJYZrM5/NHA58b9pKRn z0WnFjXZXB4Nquw5a0Dy0EPgk4s6uR7sJ+oCBVSf6yPx8Cc+dwExtOCX/RrTlPvS YjBr/f4bSmqSDlI/q/GxxWdPPQ8TSJGlV0RJDxGUzHun5IBvhTqX+1nc45x75sJa AzzkohV+MktgiNcCuPWX8fRcA6XfncSR/usfQWO57pjPHLG0ELm+BCVyoUI1OiY= =N3+D -----END PGP SIGNATURE----- --OpxMvKdplLxSdiAokh9ctIj8EN2ugShvs--