[Top] [All Lists]

Re: [RFC] libxfs kernel infrastructure (was [XFS updates] XFS developmen

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [RFC] libxfs kernel infrastructure (was [XFS updates] XFS development tree branch, xfs-libxfs-in-kernel-RFC, created. xfs-for-linus-3.15-rc2-52-g6579dd8)
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 6 May 2014 19:05:37 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140506084328.GA30444@xxxxxxxxxxxxx>
References: <20140506071855.F152E7FBC@xxxxxxxxxxx> <20140506075905.GA5421@dastard> <20140506084328.GA30444@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, May 06, 2014 at 01:43:28AM -0700, Christoph Hellwig wrote:
> Getting rid of the need for xfs_mount.h in xfs_ialloc.h xfs_da_format.h
> should be simple:
>  - inline xfs_make_iptr into the only caller
>  - move xfs_icluster_size_fsb to xfs_ialloc.c and just provide a
>    prototype for it.

Yeah, those are easy.

>  - the various conversion routines for the directory blocks really
>    shouldn't be in xfs_da_format.h anyway as they don't define the
>    format.  Just have some other header that requires a version of
>    xfs_mount included first.

Still has the same problem - the library code is dependent on an
externally defined struct xfs_mount. What needs to happen is the
directory code needs to define the structure that carries all the
precalculated geometry, and the struct mount use that structure to
store them. Then the directory code can use it's own structure
as the function argument, and the dependence on struct xfs_mount
goes away completely.


Dave Chinner

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