]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
XFS only write dirty buffers for rewrite clustering, from Nathan Scott
authorChris Wright <chrisw@sous-sol.org>
Fri, 24 Mar 2006 07:24:13 +0000 (23:24 -0800)
committerChris Wright <chrisw@sous-sol.org>
Fri, 24 Mar 2006 07:24:13 +0000 (23:24 -0800)
queue-2.6.16/series
queue-2.6.16/xfs-writeout-fix.patch [new file with mode: 0644]

index 899daeef1c5049e9ce36c87efc9de44da865fd4b..9cde35ee4dd1faf60f20999f96e5d379c7fe13f3 100644 (file)
@@ -3,3 +3,4 @@ v4l-dvb-fix-samsung-tuner-frequency-ranges.patch
 kconfig-video_decoder-must-select-fw_loader.patch
 2.6.xx-sata_mv-another-critical-fix.patch
 tcp-do-not-use-inet-id-of-global-tcp_socket-when-sending-rst.patch
+xfs-writeout-fix.patch
diff --git a/queue-2.6.16/xfs-writeout-fix.patch b/queue-2.6.16/xfs-writeout-fix.patch
new file mode 100644 (file)
index 0000000..47751c3
--- /dev/null
@@ -0,0 +1,30 @@
+From stable-bounces@linux.kernel.org  Thu Mar 23 19:51:15 2006
+Date: Fri, 24 Mar 2006 14:46:22 +1100
+From: Nathan Scott <nathans@sgi.com>
+To: stable@kernel.org
+Cc: dgc@sgi.com
+Subject: [PATCH] XFS writeout fix
+
+[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>
+---
+
+ fs/xfs/linux-2.6/xfs_aops.c |    2 +-
+ 1 files changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.16.orig/fs/xfs/linux-2.6/xfs_aops.c
++++ linux-2.6.16/fs/xfs/linux-2.6/xfs_aops.c
+@@ -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;