aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fs-writeback.c9
-rw-r--r--include/linux/writeback.h1
-rw-r--r--include/trace/events/ext4.h6
-rw-r--r--include/trace/events/writeback.h5
4 files changed, 5 insertions, 16 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index d0553f33fb50..f43c479feee9 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -560,12 +560,8 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb,
560 iput(inode); 560 iput(inode);
561 cond_resched(); 561 cond_resched();
562 spin_lock(&wb->list_lock); 562 spin_lock(&wb->list_lock);
563 if (wbc->nr_to_write <= 0) { 563 if (wbc->nr_to_write <= 0)
564 wbc->more_io = 1;
565 return 1; 564 return 1;
566 }
567 if (!list_empty(&wb->b_more_io))
568 wbc->more_io = 1;
569 } 565 }
570 /* b_io is empty */ 566 /* b_io is empty */
571 return 1; 567 return 1;
@@ -708,7 +704,6 @@ static long wb_writeback(struct bdi_writeback *wb,
708 wbc.older_than_this = &oldest_jif; 704 wbc.older_than_this = &oldest_jif;
709 } 705 }
710 706
711 wbc.more_io = 0;
712 wbc.nr_to_write = write_chunk; 707 wbc.nr_to_write = write_chunk;
713 wbc.pages_skipped = 0; 708 wbc.pages_skipped = 0;
714 wbc.inodes_written = 0; 709 wbc.inodes_written = 0;
@@ -740,7 +735,7 @@ static long wb_writeback(struct bdi_writeback *wb,
740 /* 735 /*
741 * No more inodes for IO, bail 736 * No more inodes for IO, bail
742 */ 737 */
743 if (!wbc.more_io) 738 if (list_empty(&wb->b_more_io))
744 break; 739 break;
745 /* 740 /*
746 * Nothing written. Wait for some inode to 741 * Nothing written. Wait for some inode to
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index d8e96a480850..8797b20dd22b 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -46,7 +46,6 @@ struct writeback_control {
46 unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */ 46 unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */
47 unsigned for_reclaim:1; /* Invoked from the page allocator */ 47 unsigned for_reclaim:1; /* Invoked from the page allocator */
48 unsigned range_cyclic:1; /* range_start is cyclic */ 48 unsigned range_cyclic:1; /* range_start is cyclic */
49 unsigned more_io:1; /* more io to be dispatched */
50}; 49};
51 50
52/* 51/*
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index e09592d2f916..b225d0d8c87f 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -404,7 +404,6 @@ TRACE_EVENT(ext4_da_writepages_result,
404 __field( int, pages_written ) 404 __field( int, pages_written )
405 __field( long, pages_skipped ) 405 __field( long, pages_skipped )
406 __field( int, sync_mode ) 406 __field( int, sync_mode )
407 __field( char, more_io )
408 __field( pgoff_t, writeback_index ) 407 __field( pgoff_t, writeback_index )
409 ), 408 ),
410 409
@@ -415,16 +414,15 @@ TRACE_EVENT(ext4_da_writepages_result,
415 __entry->pages_written = pages_written; 414 __entry->pages_written = pages_written;
416 __entry->pages_skipped = wbc->pages_skipped; 415 __entry->pages_skipped = wbc->pages_skipped;
417 __entry->sync_mode = wbc->sync_mode; 416 __entry->sync_mode = wbc->sync_mode;
418 __entry->more_io = wbc->more_io;
419 __entry->writeback_index = inode->i_mapping->writeback_index; 417 __entry->writeback_index = inode->i_mapping->writeback_index;
420 ), 418 ),
421 419
422 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " 420 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
423 " more_io %d sync_mode %d writeback_index %lu", 421 "sync_mode %d writeback_index %lu",
424 MAJOR(__entry->dev), MINOR(__entry->dev), 422 MAJOR(__entry->dev), MINOR(__entry->dev),
425 (unsigned long) __entry->ino, __entry->ret, 423 (unsigned long) __entry->ino, __entry->ret,
426 __entry->pages_written, __entry->pages_skipped, 424 __entry->pages_written, __entry->pages_skipped,
427 __entry->more_io, __entry->sync_mode, 425 __entry->sync_mode,
428 (unsigned long) __entry->writeback_index) 426 (unsigned long) __entry->writeback_index)
429); 427);
430 428
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 4e249b927eaa..b2cfac5f3313 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -101,7 +101,6 @@ DECLARE_EVENT_CLASS(wbc_class,
101 __field(int, for_background) 101 __field(int, for_background)
102 __field(int, for_reclaim) 102 __field(int, for_reclaim)
103 __field(int, range_cyclic) 103 __field(int, range_cyclic)
104 __field(int, more_io)
105 __field(unsigned long, older_than_this) 104 __field(unsigned long, older_than_this)
106 __field(long, range_start) 105 __field(long, range_start)
107 __field(long, range_end) 106 __field(long, range_end)
@@ -116,7 +115,6 @@ DECLARE_EVENT_CLASS(wbc_class,
116 __entry->for_background = wbc->for_background; 115 __entry->for_background = wbc->for_background;
117 __entry->for_reclaim = wbc->for_reclaim; 116 __entry->for_reclaim = wbc->for_reclaim;
118 __entry->range_cyclic = wbc->range_cyclic; 117 __entry->range_cyclic = wbc->range_cyclic;
119 __entry->more_io = wbc->more_io;
120 __entry->older_than_this = wbc->older_than_this ? 118 __entry->older_than_this = wbc->older_than_this ?
121 *wbc->older_than_this : 0; 119 *wbc->older_than_this : 0;
122 __entry->range_start = (long)wbc->range_start; 120 __entry->range_start = (long)wbc->range_start;
@@ -124,7 +122,7 @@ DECLARE_EVENT_CLASS(wbc_class,
124 ), 122 ),
125 123
126 TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d " 124 TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d "
127 "bgrd=%d reclm=%d cyclic=%d more=%d older=0x%lx " 125 "bgrd=%d reclm=%d cyclic=%d older=0x%lx "
128 "start=0x%lx end=0x%lx", 126 "start=0x%lx end=0x%lx",
129 __entry->name, 127 __entry->name,
130 __entry->nr_to_write, 128 __entry->nr_to_write,
@@ -134,7 +132,6 @@ DECLARE_EVENT_CLASS(wbc_class,
134 __entry->for_background, 132 __entry->for_background,
135 __entry->for_reclaim, 133 __entry->for_reclaim,
136 __entry->range_cyclic, 134 __entry->range_cyclic,
137 __entry->more_io,
138 __entry->older_than_this, 135 __entry->older_than_this,
139 __entry->range_start, 136 __entry->range_start,
140 __entry->range_end) 137 __entry->range_end)