qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new bloc


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"
Date: Tue, 15 Nov 2016 02:03:59 +0800
User-agent: Mutt/1.7.1 (2016-10-04)

On Mon, 11/14 16:50, Stefan Hajnoczi wrote:
> On Mon, Nov 14, 2016 at 11:49:06PM +0800, Fam Zheng wrote:
> > On Mon, 11/14 15:07, Stefan Hajnoczi wrote:
> > > On Mon, Nov 07, 2016 at 04:59:44PM -0800, Ashish Mittal wrote:
> > > > diff --git a/block/vxhs.c b/block/vxhs.c
> > > > new file mode 100644
> > > > index 0000000..8913e8f
> > > > --- /dev/null
> > > > +++ b/block/vxhs.c
> > > > @@ -0,0 +1,689 @@
> > > > +/*
> > > > + * QEMU Block driver for Veritas HyperScale (VxHS)
> > > > + *
> > > > + * This work is licensed under the terms of the GNU GPL, version 2 or 
> > > > later.
> > > > + * See the COPYING file in the top-level directory.
> > > > + *
> > > > + */
> > > > +
> > > > +#include "qemu/osdep.h"
> > > > +#include "block/block_int.h"
> > > > +#include <qnio/qnio_api.h>
> > > 
> > > Please move system headers (<>) above user headers ("").  This way you
> > > can be sure the system header isn't affected by any macros defined by
> > > user headers.
> > 
> > Yes, but still after "qemu/osdep.h", which prepares necessary bits for any 
> > other
> > headers.
> 
> I disagree.  qnio_api.h is a third-party library that doesn't need QEMU
> headers to fix up the environment for it.
> 
> By including osdep.h first you mask bugs in qnio_api.h.  Perhaps
> qnio_api.h forgot to include a header and we won't notice because
> osdep.h happened to bring in those headers first...
> 
> Can you explain the rationale for your statement?

I point this out just because I rememebr this effort happened not long ago,
which is to make osdep.h always included first (there is also a
./scripts/clean-includes to reorder the include):

https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01110.html

I think it is mostly for uncommon compilers that should have little to do with
libqnio in particular, but this is a common practice of current QEMU.

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]