[Top] [All Lists]

Re: [PATCH 0/7] RFC: combine linux and XFS inodes

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 0/7] RFC: combine linux and XFS inodes
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 14 Aug 2008 15:45:50 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1218698083-11226-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1218698083-11226-1-git-send-email-david@xxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Aug 14, 2008 at 05:14:36PM +1000, Dave Chinner wrote:
> However, this means the linux inodes are unhashed, which means we
> now need to do our own tracking of dirty state. We do this by
> hooking ->dirty_inode and ->set_page_dirty to move the inode to the
> superblock dirty list when appropriate. We also need to hook
> ->drop_inode to ensure we do writeback of dirty inodes during
> reclaim. In future, this can be moved entirely into XFS based on
> radix tree tags to track dirty inodes instead of a separate list.

This part (patches 1, 2 and 3) is horrible, and I think avoidable.
We can just insert the inode into the Linux inode hash anyway, even
if we never use it later.  That avoids these whole three patches
and all the duplication of core code inside XFS, including the
inode_lock issue and the potential problem of getting out of sync
when the core code is updated.

If you really, really want to avoid inserting the inode into the Linux
inode cache (and that would need a sound reason) the way to go would
be to remove the assumptions of no writeback for unhashed inodes form
the core code and replace it with a flag that's normally set/cleared
during hashing/unhashing but could also be set/cleared from XFS.

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