xfs
[Top] [All Lists]

Re: [PATCH 2/3] libxlog: sync up with 2.6.38 kernel code

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 2/3] libxlog: sync up with 2.6.38 kernel code
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 14 Feb 2011 16:31:22 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110214051005.GI2559@dastard>
References: <1294649091-27174-1-git-send-email-david@xxxxxxxxxxxxx> <1294649091-27174-3-git-send-email-david@xxxxxxxxxxxxx> <1297288144.2513.228.camel@doink> <20110214051005.GI2559@dastard>
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, Feb 14, 2011 at 04:10:05PM +1100, Dave Chinner wrote:
> On Wed, Feb 09, 2011 at 03:49:03PM -0600, Alex Elder wrote:
> > On Mon, 2011-01-10 at 19:44 +1100, Dave Chinner wrote:
> > > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > > 
> > > Update libxlog with the current 2.6.38 kernel code and well as
> > > updating the necessary parts of libxfs and variaous header files to
> > > ensure that it compiles correctly.

.....

> xfsprogs. As the code has changed, I'm sure there's bits that are
> now unused by userspace and should be cleaned up. We also need to
> make another pass over the kernel headers to refine what is in
> #idef__KERNEL__ regions as there is some problems in that area as
> well.  That doesn't have to be done right now, though...

....

> > > diff --git a/libxfs/trans.c b/libxfs/trans.c
> > > index 1c60f38..c5dd2ca 100644
> > > --- a/libxfs/trans.c
> > > +++ b/libxfs/trans.c
> > > @@ -36,8 +36,7 @@ libxfs_trans_alloc(
> > >   }
> > >   ptr->t_mountp = mp;
> > >   ptr->t_type = type;
> > > - ptr->t_items_free = XFS_LIC_NUM_SLOTS;
> > 
> > t_items_free is removed from the xfs_trans structure
> > in "include/xfs_trans.h" but it remains in the version
> > of that structure defined in "include/libxfs.h".
> > 
> > I believe the latter is the one we want to keep,
> > but if that's the case you'd better delete the
> > field definition there.  (The compiler isn't
> > warning you that you neglected to initialize a
> > field.)
> 
> Nor is it warning about a duplicate definition by the sound of it.
> I'll fix it up.

There are two declarations of struct xfs_trans in userspace but only
the one in libxfs.h is used because the one in include/xfs_trans.h
is surrounded bu #ifdef __KERNEL__. Just an example of the sort of
cleanup I mentioned above that is needed...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>