lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 06/12] writeback: remove unused nonblocking and congestion checks (gfs2)
Hi Steven,

On Wed, Nov 18, 2009 at 05:59:46PM +0800, Steven Whitehouse wrote:
> Hi,
>
> That looks ok to me, modulo the warnings below. The only "non-obvious"
> thing in this area which the GFS2 writepage[s] code relies upon is the
> assumption that if we have a ->writepages() then ->writepage() will
> never be called from a context which requires the fs to actually do a
> write (i.e. the fs can refuse this if required). That is also only the
> case for journaled data files - normal writes don't have that
> requirement.

Thank you for the tips. I don't think pageout() or migration
writeout() has that hard expectation for ->writepage() :)

> CC [M] fs/gfs2/aops.o
> fs/gfs2/aops.c: In function ‘gfs2_write_jdata_pagevec’:
> fs/gfs2/aops.c:272: warning: unused variable ‘bdi’
> fs/gfs2/aops.c: In function ‘gfs2_write_cache_jdata’:
> fs/gfs2/aops.c:336: warning: unused variable ‘bdi’

Ah sorry!

> Once the warnings are fixed:
>
> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
>
> Do you want me to add this patch into my tree, or were you planning to
> submit via a different tree?

Thanks, can you pull the updated patch directly to your tree?

Thanks,
Fengguang
---
writeback: remove unused nonblocking and congestion checks (gfs2)

No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
fs/gfs2/aops.c | 12 ------------
1 file changed, 12 deletions(-)

--- linux.orig/fs/gfs2/aops.c 2009-11-18 16:39:32.000000000 +0800
+++ linux/fs/gfs2/aops.c 2009-11-18 18:01:14.000000000 +0800
@@ -269,7 +269,6 @@ static int gfs2_write_jdata_pagevec(stru
pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
unsigned offset = i_size & (PAGE_CACHE_SIZE-1);
unsigned nrblocks = nr_pages * (PAGE_CACHE_SIZE/inode->i_sb->s_blocksize);
- struct backing_dev_info *bdi = mapping->backing_dev_info;
int i;
int ret;

@@ -313,11 +312,6 @@ static int gfs2_write_jdata_pagevec(stru

if (ret || (--(wbc->nr_to_write) <= 0))
ret = 1;
- if (wbc->nonblocking && bdi_write_congested(bdi)) {
- wbc->encountered_congestion = 1;
- ret = 1;
- }
-
}
gfs2_trans_end(sdp);
return ret;
@@ -338,7 +332,6 @@ static int gfs2_write_jdata_pagevec(stru
static int gfs2_write_cache_jdata(struct address_space *mapping,
struct writeback_control *wbc)
{
- struct backing_dev_info *bdi = mapping->backing_dev_info;
int ret = 0;
int done = 0;
struct pagevec pvec;
@@ -348,11 +341,6 @@ static int gfs2_write_cache_jdata(struct
int scanned = 0;
int range_whole = 0;

- if (wbc->nonblocking && bdi_write_congested(bdi)) {
- wbc->encountered_congestion = 1;
- return 0;
- }
-
pagevec_init(&pvec, 0);
if (wbc->range_cyclic) {
index = mapping->writeback_index; /* Start from prev offset */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2009-11-18 11:13    [W:0.170 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site