xfs
[Top] [All Lists]

Re: [PATCH 1/5] xfs: struct xfs_sb is no longer tied to the on-disk form

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/5] xfs: struct xfs_sb is no longer tied to the on-disk format
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 4 Feb 2015 10:34:50 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150203214608.GJ4251@dastard>
References: <1422826983-29570-1-git-send-email-david@xxxxxxxxxxxxx> <1422826983-29570-2-git-send-email-david@xxxxxxxxxxxxx> <20150202084102.GA28121@xxxxxxxxxxxxx> <20150202193020.GJ6282@dastard> <20150203213744.GA31631@xxxxxxxxxxxxx> <20150203214608.GJ4251@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Feb 04, 2015 at 08:46:09AM +1100, Dave Chinner wrote:
> On Tue, Feb 03, 2015 at 01:37:44PM -0800, Christoph Hellwig wrote:
> > On Tue, Feb 03, 2015 at 06:30:21AM +1100, Dave Chinner wrote:
> > > > I'd expect to move it close to stuct xfs_mount, and maybe even merge
> > > > it into that in the long run.
> > > 
> > > I guess moving the structure there is fine, but we still want all
> > > the version functions to be shared with userspace, which then makes
> > > for an interesting set of dependencies. Any other ideas?
> > 
> > Are they really worth the sharing?  If they are worth it we'll
> > need somethign that can expect a xfs_sb/xfs_mount to be defined.
> 
> I suppose we could stop sharing them - they change rarely enough
> and it's only a few lines of code for each new feature that would
> then need to be duplicated. Not a huge burden...

Just a further thought on this - I might keep the per-cpu counters
in the struct mount. That way the to/from disk code only needs to
sum/set the per-cpu counter values to/from the m_sb as they
currently do and so the xfs_sb can remain unchanged for the moment.

That might be a cleaner way to start this patchset, especially as we
already have the per-cpu counter hooks in all the places we need
them.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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