Received: from eggs.gnu.org ([2001:4830:134:3::10]:39052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs6rO-0005Dz-Cm for qemu-devel@nongnu.org; Thu, 06 Oct 2016 07:29:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs6rM-0006pW-Ey for qemu-devel@nongnu.org; Thu, 06 Oct 2016 07:29:09 -0400 Date: Thu, 6 Oct 2016 13:29:00 +0200 From: Kevin Wolf Message-ID: <20161006112900.GC5188@noname.redhat.com> References: <1475659573-1664-1-git-send-email-kwolf@redhat.com> <1475659573-1664-3-git-send-email-kwolf@redhat.com> <67118bdb-13e5-e44a-9fd6-37f2b1248241@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline In-Reply-To: <67118bdb-13e5-e44a-9fd6-37f2b1248241@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/3] block-backend: Remember if attached device is non-qdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-block@nongnu.org, eblake@redhat.com, qemu-devel@nongnu.org --uZ3hkaAS1mZxFaxD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 05.10.2016 um 20:01 hat Max Reitz geschrieben: > On 05.10.2016 11:26, Kevin Wolf wrote: > > Almost all block devices are qdevified by now. This allows us to go back > > from the BlockBackend to the DeviceState. xen_disk is the last device > > that is missing. We'll remember in the BlockBackend if a xen_disk is > > attached and can then disable any features that require going from a BB > > to the DeviceState. > >=20 > > While at it, clearly mark the function used by xen_disk as legacy even > > in its name, not just in TODO comments. > >=20 > > Signed-off-by: Kevin Wolf > > +/* > > + * Attach device model @dev to @blk. > > * @blk must not have a device model attached already. > > * TODO qdevified devices don't use this, remove when devices are qdev= ified > > */ > > -void blk_attach_dev_nofail(BlockBackend *blk, void *dev) > > +void blk_attach_dev_legacy(BlockBackend *blk, void *dev) > > { > > if (blk_attach_dev(blk, dev) < 0) { >=20 > I'd make this a blk_do_attach_dev(), but it's not syntactically wrong, > so the choice is up to you. Thanks for catching this, what you suggest is what I intended. Maybe we should just enable the gcc --do-what-i-mean option. Kevin --uZ3hkaAS1mZxFaxD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJX9jV8AAoJEH8JsnLIjy/WM4AQAJuxLYso2DZjCqIMNJScnkds V0JTczNmRDPguN08uBvQQRNnM6AJAta5/DUovF36rxAl4oSBW1H/T/9iU7cv9ycV MKpHKg/0fSQoigw2VUu/kXjXXm3X0GfKGrbBJqYcXWIKgk/jtpsMqPWJy8gPB3cN WRygo8frJQCnHMkVt33MwGy4fhQ/Dc0molyBd73H/Vwmo+Jb7iHFma8HEaqEZd1I 9qOYXRTilgSvlSYPk3SMzZpJVxLwwXPupp57O8sLQxd++fdEHSAouWoudPHOGulp rYo+FdQDDcsyJ1wxj7Ao63tirXsoIjNLTJw0xHoJqwA9RCvpmLv/ym1ZrAOGYxWy yz8X4uE83SeVBTqHhcULf/t1G2z7jeOAQ8BJJ2H7HaZurVarRh2SbyxYJaEBDcF0 MLPy7fZLaEpVF2yknVbadYDCSTgXgWGiGCijr0zNKga+YD2hI7zNGI8hsIZeOZ+4 ZVSVC67YR+xBswjjUqrGWHkuuYDw4mda/kHR1+1Rk6o53mVdWn81FwAx61YqaUe7 52gSzYgQwOjBiCSRxzh1JvXUgRTCLNCuJiIuUlmszPaH6QNwjHVEorsk7AOy0baV ElOmCVFdJjMvm2kmdVadOITLMmtHSrbGhpakJCLIDosemNromRjupeKguP2oyV0C H8d/DGtPCtSBslwS5MGl =lA8h -----END PGP SIGNATURE----- --uZ3hkaAS1mZxFaxD--