On Fri, Sep 19, 2008 at 05:27:22AM -0400, Christoph Hellwig wrote:
> On Sun, Sep 14, 2008 at 12:57:55AM +1000, Dave Chinner wrote:
> > When we need to go from the log to the AIL, we have
> > to go via the xfs_mount. Add a xfs_ail pointer to the log
> > so we can go directly to the AIL associated with the log.
> Looks correct, but I wonder what it actually buys us.
Not much initially.
The original intent of the log manager was that each
log could host transactions for multiple XFS filesystems,
which cannot be done if the log directly references a specific
filesystem. The log needs to be independent of an xfs_mount
for this sort of arrangement to work properly, and the only
time the log should reference a struct xfs_mount is through
a log item that needs to reference filesystem specific information
(another reason I haven't removed the li_mountp yet).
And, of course, then there's the other way around - multiple
logs in the one filesystem - the log needs a direct pointer
to the AIL that it puts all it's items into rather than the
xfs_mount, likewise the AIL needs a backpointer to the log....