* [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage
@ 2010-06-07 10:03 Christoph Hellwig
2010-06-07 10:18 ` Steven Whitehouse
2010-06-07 16:19 ` Steven Whitehouse
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2010-06-07 10:03 UTC (permalink / raw)
To: cluster-devel.redhat.com
GFS2 always creates buffer_heads during ->write_begin or ->page_mkwrite,
which means mpage_writepage always falls back to block_write_full_page.
So stop calling mpage_writepage and always call block_write_full_page
directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/gfs2/aops.c
===================================================================
--- linux-2.6.orig/fs/gfs2/aops.c 2010-06-07 11:22:42.239273013 +0200
+++ linux-2.6/fs/gfs2/aops.c 2010-06-07 11:23:23.563255580 +0200
@@ -136,10 +136,7 @@ static int gfs2_writeback_writepage(stru
if (ret <= 0)
return ret;
- ret = mpage_writepage(page, gfs2_get_block_noalloc, wbc);
- if (ret == -EAGAIN)
- ret = block_write_full_page(page, gfs2_get_block_noalloc, wbc);
- return ret;
+ return block_write_full_page(page, gfs2_get_block_noalloc, wbc);
}
/**
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage
2010-06-07 10:03 [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage Christoph Hellwig
@ 2010-06-07 10:18 ` Steven Whitehouse
2010-06-07 16:19 ` Steven Whitehouse
1 sibling, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2010-06-07 10:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2010-06-07 at 12:03 +0200, Christoph Hellwig wrote:
> GFS2 always creates buffer_heads during ->write_begin or ->page_mkwrite,
> which means mpage_writepage always falls back to block_write_full_page.
>
> So stop calling mpage_writepage and always call block_write_full_page
> directly.
>
->write_begin does, but I did hope to change that eventually. On the
other hand that isn't true of ->page_mkwrite unless an unstuffing
operation occurs,
Steve.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/fs/gfs2/aops.c
> ===================================================================
> --- linux-2.6.orig/fs/gfs2/aops.c 2010-06-07 11:22:42.239273013 +0200
> +++ linux-2.6/fs/gfs2/aops.c 2010-06-07 11:23:23.563255580 +0200
> @@ -136,10 +136,7 @@ static int gfs2_writeback_writepage(stru
> if (ret <= 0)
> return ret;
>
> - ret = mpage_writepage(page, gfs2_get_block_noalloc, wbc);
> - if (ret == -EAGAIN)
> - ret = block_write_full_page(page, gfs2_get_block_noalloc, wbc);
> - return ret;
> + return block_write_full_page(page, gfs2_get_block_noalloc, wbc);
> }
>
> /**
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage
2010-06-07 10:03 [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage Christoph Hellwig
2010-06-07 10:18 ` Steven Whitehouse
@ 2010-06-07 16:19 ` Steven Whitehouse
1 sibling, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2010-06-07 16:19 UTC (permalink / raw)
To: cluster-devel.redhat.com
Use nobh_writepage rather than calling mpage_writepage directly.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 9f8b525..9485a88 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -136,10 +136,7 @@ static int gfs2_writeback_writepage(struct page
*page,
if (ret <= 0)
return ret;
- ret = mpage_writepage(page, gfs2_get_block_noalloc, wbc);
- if (ret == -EAGAIN)
- ret = block_write_full_page(page, gfs2_get_block_noalloc, wbc);
- return ret;
+ return nobh_writepage(page, gfs2_get_block_noalloc, wbc);
}
/**
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-07 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 10:03 [Cluster-devel] [PATCH] gfs2: stop using mpage_writepage Christoph Hellwig
2010-06-07 10:18 ` Steven Whitehouse
2010-06-07 16:19 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).