浏览代码

[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.

SGI-PV: 951193
SGI-Modid: xfs-linux-melb:xfs-kern:25531a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>

David Chinner 19 年之前
父节点
当前提交
2ddee844ee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/xfs/linux-2.6/xfs_aops.c

+ 1 - 1
fs/xfs/linux-2.6/xfs_aops.c

@@ -647,7 +647,7 @@ xfs_is_delayed_page(
 				acceptable = (type == IOMAP_UNWRITTEN);
 				acceptable = (type == IOMAP_UNWRITTEN);
 			else if (buffer_delay(bh))
 			else if (buffer_delay(bh))
 				acceptable = (type == IOMAP_DELAY);
 				acceptable = (type == IOMAP_DELAY);
-			else if (buffer_mapped(bh))
+			else if (buffer_dirty(bh) && buffer_mapped(bh))
 				acceptable = (type == 0);
 				acceptable = (type == 0);
 			else
 			else
 				break;
 				break;