xfs
[Top] [All Lists]

Re: [PATCH] make inode reclaim synchronise with xfs_iflush_done()

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: [PATCH] make inode reclaim synchronise with xfs_iflush_done()
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 14 Dec 2007 20:29:40 +0000
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <475F878D.6090407@sgi.com>
References: <475F878D.6090407@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
On Wed, Dec 12, 2007 at 06:02:37PM +1100, Lachlan McIlroy wrote:
> On a forced shutdown, xfs_finish_reclaim() will skip flushing the inode.
> If the inode flush lock is not already held and there is an outstanding
> xfs_iflush_done() then we might free the inode prematurely.  By acquiring
> and releasing the flush lock we will synchronise with xfs_iflush_done().

Sound fine, but I think it would be nicer if we could keep the else if
formatting, ala:

        /*
         * We are not interested in doing an iflush if we're
         * in the process of shutting down the filesystem forcibly.
         * So, just reclaim the inode.
         */
        } else if (locked) {
                xfs_ifunlock(ip);
                xfs_iunlock(ip, XFS_ILOCK_EXCL);
        } else {
                /* 
                 * If the flush lock is not already held then temporarily
                 * acquire it to synchronize with xfs_iflush_done.
                 */
                xfs_iflock(ip);
                xfs_ifunlock(ip);
        }


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