Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c734c79bc397eace039bea406997efa89f879c14
Commit:     c734c79bc397eace039bea406997efa89f879c14
Parent:     c63a1190368771b8207d86c4217ae4afdf1cbd5e
Author:     Lachlan McIlroy <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 18 16:17:41 2007 +1100
Committer:  Lachlan McIlroy <[EMAIL PROTECTED]>
CommitDate: Tue Dec 18 17:16:17 2007 +1100

    [XFS] Don't wait for pending I/Os when purging blocks beyond eof.
    
    On last close of a file we purge blocks beyond eof. The same code is used
    when we truncate the file size down. In this case we need to wait for any
    pending I/Os for dirty pages beyond the new eof. For the last close case
    we are not changing the file size and therefore do not need to wait for
    any I/Os to complete. This fixes a performance bottleneck where writes
    into the page cache and cache flushes can become mutually exclusive.
    
    SGI-PV: 964002
    SGI-Modid: xfs-linux-melb:xfs-kern:30220a
    
    Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]>
    Signed-off-by: Peter Leckie <[EMAIL PROTECTED]>
---
 fs/xfs/xfs_inode.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index abf509a..3449480 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1459,8 +1459,10 @@ xfs_itruncate_start(
        mp = ip->i_mount;
        vp = XFS_ITOV(ip);
 
-       vn_iowait(ip);  /* wait for the completion of any pending DIOs */
-       
+       /* wait for the completion of any pending DIOs */
+       if (new_size < ip->i_size)
+               vn_iowait(ip);
+
        /*
         * Call toss_pages or flushinval_pages to get rid of pages
         * overlapping the region being removed.  We have to use
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to