Re: [PATCH] quota: Split out quota_struct.h out of quota.h

From: Jan Kara
Date: Wed Jun 04 2008 - 13:57:53 EST


On Wed 04-06-08 16:38:06, David Woodhouse wrote:
> On Wed, 2008-06-04 at 18:26 +0300, Adrian Bunk wrote:
> > On Wed, Jun 04, 2008 at 04:51:30PM +0200, Jan Kara wrote:
> > > On Wed 04-06-08 16:56:24, Adrian Bunk wrote:
> > > > On Mon, Jun 02, 2008 at 07:11:10PM +0200, Jan Kara wrote:
> > >...
> > > > > --- a/include/linux/quota.h
> > > > > +++ b/include/linux/quota.h
> > > > > @@ -37,13 +37,11 @@
> > > > >
> > > > > #include <linux/errno.h>
> > > > > #include <linux/types.h>
> > > > > +#include <linux/quota_struct.h>
> > > > >...
> > > >
> > > > This breaks our userspace headers.
> > > >
> > > > Please always run "make headers_check" after touching #include's
> > > > under include/
> > > I didn't know this existed :) I'll use it in future. Thanks. The question
> > > is how to fix this. Probably the best would be if didn't have to export new
> > > header file, wouldn't it? We can split the headers into quota.h containing
> > > structures and all other userspace stuff and quota_func.h carrying other
> > > kernel-internal stuff like inline functions etc. Oh well...
> >
> > Considering that quota.h #include's quota_struct.h it wouldn't be a
> > problem if the new header also gets exported to userspace.
> >
> > At least I do not have any strong opinion regarding how to best organize
> > the quota headers - David (Cc'ed) might have a more input on this.
>
> To a large extent it doesn't actually matter for userspace.
> All userspace will be using <sys/quota.h> instead, because for a very
> long period in our history, <linux/quota.h> would be completely broken
> for userspace because it would give the v1 quota stuff. I believe that
> was because we were depending on some CONFIG_xxx definition, which
> doesn't exist in userspace (we _really_ should add that to headers_check
> some time).
>
> That said, the patch looks OK as long as you remember to add the new
> file to unifdef-y, and as long as you have #ifdef __KERNEL__ in the
Sorry, what does "add the new file to unifdef-y" mean?

> correct places in it (I can't see the updated patch with the new file
> actually included, so I haven't checked).
The updated patch is attached if you're interested. I think __KERNEL__ is
there where it should be...
Thanks for reply.

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR