[PATCH 39/45] writeback: remove wbc.more_io

From: Wu Fengguang
Date: Wed Oct 07 2009 - 04:08:51 EST


It seems no longer required. It was introduced mainly to deal with the
complexity from _multiple_ superblock queues. Now there are only one
queue, so infomation can be directly queried if necessary.

CC: Theodore Ts'o <tytso@xxxxxxx>
CC: Dave Chinner <david@xxxxxxxxxxxxx>
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
fs/fs-writeback.c | 13 +------------
include/linux/writeback.h | 1 -
include/trace/events/ext4.h | 6 ++----
3 files changed, 3 insertions(+), 17 deletions(-)

--- linux.orig/fs/fs-writeback.c 2009-10-07 14:32:50.000000000 +0800
+++ linux/fs/fs-writeback.c 2009-10-07 14:32:51.000000000 +0800
@@ -733,12 +733,8 @@ static long writeback_inodes_wb(struct b
iput(inode);
cond_resched();
spin_lock(&inode_lock);
- if (wbc->nr_to_write <= 0) {
- wbc->more_io = 1;
+ if (wbc->nr_to_write <= 0)
break;
- }
- if (!list_empty(&wb->b_more_io))
- wbc->more_io = 1;
if (stop_time && time_after(jiffies, stop_time))
break;
}
@@ -800,7 +796,6 @@ static long wb_writeback(struct bdi_writ
int fg_rounds = 0;
long wrote = 0;
long nr;
- struct inode *inode;

/*
* keep sync from extra jobs and livelock
@@ -840,7 +835,6 @@ static long wb_writeback(struct bdi_writ
if (args->for_background && !over_bground_thresh())
break;

- wbc.more_io = 0;
wbc.encountered_congestion = 0;
wbc.pages_skipped = 0;
nr = writeback_inodes_wb(wb, &wbc);
@@ -863,11 +857,6 @@ static long wb_writeback(struct bdi_writ
}

/*
- * Bail if no more IO
- */
- if (!wbc.more_io)
- break;
- /*
* Did we write something? Try for more
*/
if (nr)
--- linux.orig/include/linux/writeback.h 2009-10-07 14:31:46.000000000 +0800
+++ linux/include/linux/writeback.h 2009-10-07 14:32:51.000000000 +0800
@@ -78,7 +78,6 @@ struct writeback_control {
unsigned for_sync:1; /* A writeback for sync */
unsigned for_reclaim:1; /* Invoked from the page allocator */
unsigned range_cyclic:1; /* range_start is cyclic */
- unsigned more_io:1; /* more io to be dispatched */
/*
* write_cache_pages() won't update wbc->nr_to_write and
* mapping->writeback_index if no_nrwrite_index_update
--- linux.orig/include/trace/events/ext4.h 2009-10-07 14:31:46.000000000 +0800
+++ linux/include/trace/events/ext4.h 2009-10-07 14:32:51.000000000 +0800
@@ -311,7 +311,6 @@ TRACE_EVENT(ext4_da_writepages_result,
__field( int, pages_written )
__field( long, pages_skipped )
__field( char, encountered_congestion )
- __field( char, more_io )
__field( char, no_nrwrite_index_update )
__field( pgoff_t, writeback_index )
),
@@ -323,16 +322,15 @@ TRACE_EVENT(ext4_da_writepages_result,
__entry->pages_written = pages_written;
__entry->pages_skipped = wbc->pages_skipped;
__entry->encountered_congestion = wbc->encountered_congestion;
- __entry->more_io = wbc->more_io;
__entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
__entry->writeback_index = inode->i_mapping->writeback_index;
),

- TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu",
+ TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d no_nrwrite_index_update %d writeback_index %lu",
jbd2_dev_to_name(__entry->dev),
(unsigned long) __entry->ino, __entry->ret,
__entry->pages_written, __entry->pages_skipped,
- __entry->encountered_congestion, __entry->more_io,
+ __entry->encountered_congestion,
__entry->no_nrwrite_index_update,
(unsigned long) __entry->writeback_index)
);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/