From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6g28-0001pu-5s for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:52:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6g24-0003MH-9D for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:52:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6g24-0003L4-1L for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:52:24 -0500 References: <1478566785-4002-1-git-send-email-ashish.mittal@veritas.com> <1478566785-4002-2-git-send-email-ashish.mittal@veritas.com> <20161114150701.GD26198@stefanha-x1.localdomain> <20161114154906.GC2373@lemon> <20161114165034.GA1352@stefanha-x1.localdomain> <20161114180359.GA24217@lemon> <20161115020405.GB9226@lemon> <20161115101850.GA4836@stefanha-x1.localdomain> From: Eric Blake Message-ID: Date: Tue, 15 Nov 2016 09:52:20 -0600 MIME-Version: 1.0 In-Reply-To: <20161115101850.GA4836@stefanha-x1.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D3lMw0R5dpO9ALDjkwiWb2L5aHdWOhP6S" Subject: Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Fam Zheng Cc: kwolf@redhat.com, Venkatesha.Mg@veritas.com, ashish.mittal@veritas.com, jcody@redhat.com, qemu-devel@nongnu.org, Rakesh.Ranjan@veritas.com, armbru@redhat.com, Ketan.Nilangekar@veritas.com, Abhijit.Dey@veritas.com, pbonzini@redhat.com, Buddhi.Madhav@veritas.com, Ashish Mittal This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --D3lMw0R5dpO9ALDjkwiWb2L5aHdWOhP6S From: Eric Blake To: Stefan Hajnoczi , Fam Zheng Cc: kwolf@redhat.com, Venkatesha.Mg@veritas.com, ashish.mittal@veritas.com, jcody@redhat.com, qemu-devel@nongnu.org, Rakesh.Ranjan@veritas.com, armbru@redhat.com, Ketan.Nilangekar@veritas.com, Abhijit.Dey@veritas.com, pbonzini@redhat.com, Buddhi.Madhav@veritas.com, Ashish Mittal Message-ID: Subject: Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" References: <1478566785-4002-1-git-send-email-ashish.mittal@veritas.com> <1478566785-4002-2-git-send-email-ashish.mittal@veritas.com> <20161114150701.GD26198@stefanha-x1.localdomain> <20161114154906.GC2373@lemon> <20161114165034.GA1352@stefanha-x1.localdomain> <20161114180359.GA24217@lemon> <20161115020405.GB9226@lemon> <20161115101850.GA4836@stefanha-x1.localdomain> In-Reply-To: <20161115101850.GA4836@stefanha-x1.localdomain> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/15/2016 04:18 AM, Stefan Hajnoczi wrote: > On Tue, Nov 15, 2016 at 10:04:05AM +0800, Fam Zheng wrote: >> On Mon, 11/14 13:06, Eric Blake wrote: >>> So I guess you have to determine if libqnio is something that should >>> compile completely independent from qemu, or whether it is so closely= >>> tied to the rest of qemu that it should follow qemu conventions. >> >> The question is on include directives in block/vxhs.c, not libnqio lib= rary >> header, so qemu conventions apply. >=20 > Eric: The libqnio library header is not copied into the QEMU source > tree. It is an external library dependency like libnfs or libglfs. >=20 > Fam, Markus: Unfortunately neither the clean-includes script nor its > patch series cover letter explains *why* osdep.h should be included > before system headers. For the same reason that should be included first before system headers in an autoconf'd project. Many platforms ship (semi-)broken system headers, where configure detects AND works around the problems, but only if the workaround CONSISTENTLY happens before any system header is included. It is a LOT harder to track down compilation or link or even subtle runtime failures if you don't consistently use your workaround all the time, such that some .c files got the workaround but others did not. > The libqnio header is self-contained (i.e. you can #include it and it > has no dependencies) and only used by vxhs.c. Why is it a good idea to= > include qemu/osdep.h first? >=20 > Seems like a bad idea to me because it masks missing dependencies in th= e > libqnio header. If the libqnio header is completely independent, then it should not be part of the qemu source tree (with "" inclusion), but should instead be externally included (with <> inclusion), just like any other third-party library we link against. But even then, we STILL want our osdep.h to occur before ANY third-party library, so that we have a CONSISTENT environment, which is why we mandate that osdep.h be included first in all qemu .c files. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --D3lMw0R5dpO9ALDjkwiWb2L5aHdWOhP6S 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/ iQEcBAEBCAAGBQJYKy80AAoJEKeha0olJ0NqWAAIAItYoi5Ky20WF6biqFe3LaAB kTNuPPD9mYjtx6z6MgxOIC1z2NUDRONXeQThpJIf1rIPhZXJ9ix7qmqteQ+zyAEn HS4lomRlg0FhkIOTvWmgDTaSdhDRANb8EspWmqEg/6+ajZzpSO/j2Syjm292woZj lE8SOY0JYcOCkwpsdiWyz7nsgBKXqtVFSMjqsgzapViXH6zNJASBU+13Jl8iHcGD Iok1dlECnrgkzuFl9oDVNBcRXaT+IylJrCnetboOjatcs1qhD7OolHxGv/fCHCbj MbNPwTSrID3A+fucqEFtnU1uY8+bhvXlAkHUog1nnQCTwg6hc/ssq3Pzlas9zgc= =ZmzA -----END PGP SIGNATURE----- --D3lMw0R5dpO9ALDjkwiWb2L5aHdWOhP6S--