]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] XFS writeout fix
authorNathan Scott <nathans@sgi.com>
Fri, 24 Mar 2006 03:46:22 +0000 (14:46 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Mar 2006 06:47:30 +0000 (22:47 -0800)
[XFS] Check that a page has dirty buffers before finding it acceptable for
rewrite clustering.  This prevents writing excessive amounts of clean data
when doing random rewrites of a cached file.

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_aops.c

index 74d8be87f983d4995c32bc87ebcc89ff33b577bb..a98073629b48723fbd862a99dba6563d901bb7c2 100644 (file)
@@ -616,7 +616,7 @@ xfs_is_delayed_page(
                                acceptable = (type == IOMAP_UNWRITTEN);
                        else if (buffer_delay(bh))
                                acceptable = (type == IOMAP_DELAY);
-                       else if (buffer_mapped(bh))
+                       else if (buffer_dirty(bh) && buffer_mapped(bh))
                                acceptable = (type == 0);
                        else
                                break;