xfs
[Top] [All Lists]

Re: [PATCH] xfs: don't hold the XFS_ILOCK while flushing pages in swapex

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: don't hold the XFS_ILOCK while flushing pages in swapext
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 27 Jul 2010 03:53:13 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1280209651-10800-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1280209651-10800-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-08-17)
On Tue, Jul 27, 2010 at 03:47:31PM +1000, Dave Chinner wrote:
> +
> +     /*
> +      * can't hold the ILOCK while flushing pages, so flush now we won't get
> +      * new pages cached as we hold the XFS_IOLOCK_EXCL.
> +      */
> +     if (VN_CACHED(VFS_I(tip)) != 0) {

There's really no point in the VN_CACHED check here.  Not only does
xfs_flushinval_pages repeat it at the beginning, but it's also
rather superflous as filemap_write_and_wait deals with the condition
of no attached pages efficiently.

Otherwise looks good,


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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