
From: Hirokazu Takahashi <taka@valinux.co.jp>

Hi,

The patch is against 2.6.10-rc1-mm2-mhp1 .

ext3 filesystem now has its migrate_page method as same as ext2.
It can migrate a buffer-attached page without writeback I/O.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/fs/ext3/inode.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -puN fs/ext3/inode.c~P21-nowriteback-ext3 fs/ext3/inode.c
--- memhotplug/fs/ext3/inode.c~P21-nowriteback-ext3	2004-11-12 16:52:28.000000000 -0800
+++ memhotplug-dave/fs/ext3/inode.c	2004-11-12 16:52:28.000000000 -0800
@@ -35,6 +35,7 @@
 #include <linux/buffer_head.h>
 #include <linux/writeback.h>
 #include <linux/mpage.h>
+#include <linux/mmigrate.h>
 #include <linux/uio.h>
 #include "xattr.h"
 #include "acl.h"
@@ -1535,6 +1536,12 @@ static int ext3_journalled_set_page_dirt
 	return __set_page_dirty_nobuffers(page);
 }
 
+static int
+ext3_migrate_page(struct page *from, struct page *to)
+{
+	return generic_migrate_page(from, to, migrate_page_buffer);
+}
+
 static struct address_space_operations ext3_ordered_aops = {
 	.readpage	= ext3_readpage,
 	.readpages	= ext3_readpages,
@@ -1546,6 +1553,7 @@ static struct address_space_operations e
 	.invalidatepage	= ext3_invalidatepage,
 	.releasepage	= ext3_releasepage,
 	.direct_IO	= ext3_direct_IO,
+	.migrate_page	= ext3_migrate_page,
 };
 
 static struct address_space_operations ext3_writeback_aops = {
@@ -1559,6 +1567,7 @@ static struct address_space_operations e
 	.invalidatepage	= ext3_invalidatepage,
 	.releasepage	= ext3_releasepage,
 	.direct_IO	= ext3_direct_IO,
+	.migrate_page	= ext3_migrate_page,
 };
 
 static struct address_space_operations ext3_journalled_aops = {
@@ -1572,6 +1581,7 @@ static struct address_space_operations e
 	.bmap		= ext3_bmap,
 	.invalidatepage	= ext3_invalidatepage,
 	.releasepage	= ext3_releasepage,
+	.migrate_page	= ext3_migrate_page,
 };
 
 void ext3_set_aops(struct inode *inode)
_
