[PATCH 4/4] writeback: Remove pages_skipped from writeback_control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pages_skipped in struct writeback_control isn't used anymore. Remove it.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 fs/btrfs/extent_io.c             |  4 +---
 fs/ceph/addr.c                   |  2 --
 fs/f2fs/checkpoint.c             |  1 -
 fs/f2fs/data.c                   |  1 -
 fs/f2fs/node.c                   |  1 -
 fs/fs-writeback.c                |  1 -
 include/linux/writeback.h        |  2 --
 include/trace/events/btrfs.h     |  9 +++------
 include/trace/events/ext4.h      | 14 ++++----------
 include/trace/events/writeback.h |  8 ++------
 mm/page-writeback.c              |  1 -
 11 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3955e475ceec..b727cc413aec 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3240,9 +3240,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
 						      page_end);
 		if (ret) {
 			/* Fixup worker will requeue */
-			if (ret == -EBUSY)
-				wbc->pages_skipped++;
-			else
+			if (ret != -EBUSY)
 				redirty_page_for_writepage(wbc, page);
 			update_nr_written(page, wbc, nr_written);
 			unlock_page(page);
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index b53278c9fd97..7943d4197514 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -526,8 +526,6 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
 		dout("writepage setting page/mapping error %d %p\n", err, page);
 		SetPageError(page);
 		mapping_set_error(&inode->i_data, err);
-		if (wbc)
-			wbc->pages_skipped++;
 	} else {
 		dout("writepage cleaned page %p\n", page);
 		err = 0;  /* vfs expects us to return 0 */
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 4aa521aa9bc3..9beb9e218f19 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -175,7 +175,6 @@ no_write:
 
 redirty_out:
 	dec_page_count(sbi, F2FS_DIRTY_META);
-	wbc->pages_skipped++;
 	account_page_redirty(page);
 	set_page_dirty(page);
 	return AOP_WRITEPAGE_ACTIVATE;
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 45abd60e2bff..fd5825f0c1db 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -838,7 +838,6 @@ out:
 	return 0;
 
 redirty_out:
-	wbc->pages_skipped++;
 	account_page_redirty(page);
 	set_page_dirty(page);
 	return AOP_WRITEPAGE_ACTIVATE;
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index a161e955c4c8..b294debb8200 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1228,7 +1228,6 @@ static int f2fs_write_node_page(struct page *page,
 
 redirty_out:
 	dec_page_count(sbi, F2FS_DIRTY_NODES);
-	wbc->pages_skipped++;
 	account_page_redirty(page);
 	set_page_dirty(page);
 	return AOP_WRITEPAGE_ACTIVATE;
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 6bf9c50ecd53..426ff81d9863 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -570,7 +570,6 @@ restart:
 
 		write_chunk = writeback_chunk_size(wb->bdi, work);
 		wbc.nr_to_write = write_chunk;
-		wbc.pages_skipped = 0;
 
 		/*
 		 * We use I_SYNC to pin the inode in memory. While it is set
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 5777c13849ba..5d15d6299347 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -66,8 +66,6 @@ enum wb_reason {
 struct writeback_control {
 	long nr_to_write;		/* Write this many pages, and decrement
 					   this for each page written */
-	long pages_skipped;		/* Pages which were not written */
-
 	/*
 	 * For a_ops->writepages(): if start or end are non-zero then this is
 	 * a hint that the filesystem need only write out the pages inside that
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 4ee4e30d26d9..95ec983b55e4 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -311,7 +311,6 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
 		__field(	ino_t,  ino			)
 		__field(	pgoff_t,  index			)
 		__field(	long,   nr_to_write		)
-		__field(	long,   pages_skipped		)
 		__field(	loff_t, range_start		)
 		__field(	loff_t, range_end		)
 		__field(	char,   for_kupdate		)
@@ -325,7 +324,6 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
 		__entry->ino		= inode->i_ino;
 		__entry->index		= page->index;
 		__entry->nr_to_write	= wbc->nr_to_write;
-		__entry->pages_skipped	= wbc->pages_skipped;
 		__entry->range_start	= wbc->range_start;
 		__entry->range_end	= wbc->range_end;
 		__entry->for_kupdate	= wbc->for_kupdate;
@@ -337,14 +335,13 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
 	),
 
 	TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, "
-		  "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, "
+		  "nr_to_write = %ld, range_start = %llu, "
 		  "range_end = %llu, for_kupdate = %d, "
 		  "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu",
 		  show_root_type(__entry->root_objectid),
 		  (unsigned long)__entry->ino, __entry->index,
-		  __entry->nr_to_write, __entry->pages_skipped,
-		  __entry->range_start, __entry->range_end,
-		  __entry->for_kupdate,
+		  __entry->nr_to_write, __entry->range_start,
+		  __entry->range_end, __entry->for_kupdate,
 		  __entry->for_reclaim, __entry->range_cyclic,
 		  (unsigned long)__entry->writeback_index)
 );
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 6a1a0245474f..20a4b1b0511a 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -347,7 +347,6 @@ TRACE_EVENT(ext4_writepages,
 		__field(	dev_t,	dev			)
 		__field(	ino_t,	ino			)
 		__field(	long,	nr_to_write		)
-		__field(	long,	pages_skipped		)
 		__field(	loff_t,	range_start		)
 		__field(	loff_t,	range_end		)
 		__field(       pgoff_t,	writeback_index		)
@@ -360,7 +359,6 @@ TRACE_EVENT(ext4_writepages,
 		__entry->dev		= inode->i_sb->s_dev;
 		__entry->ino		= inode->i_ino;
 		__entry->nr_to_write	= wbc->nr_to_write;
-		__entry->pages_skipped	= wbc->pages_skipped;
 		__entry->range_start	= wbc->range_start;
 		__entry->range_end	= wbc->range_end;
 		__entry->writeback_index = inode->i_mapping->writeback_index;
@@ -369,13 +367,12 @@ TRACE_EVENT(ext4_writepages,
 		__entry->range_cyclic	= wbc->range_cyclic;
 	),
 
-	TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
+	TP_printk("dev %d,%d ino %lu nr_to_write %ld "
 		  "range_start %lld range_end %lld sync_mode %d "
 		  "for_kupdate %d range_cyclic %d writeback_index %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->nr_to_write,
-		  __entry->pages_skipped, __entry->range_start,
-		  __entry->range_end, __entry->sync_mode,
+		  __entry->range_start, __entry->range_end, __entry->sync_mode,
 		  __entry->for_kupdate, __entry->range_cyclic,
 		  (unsigned long) __entry->writeback_index)
 );
@@ -447,7 +444,6 @@ TRACE_EVENT(ext4_writepages_result,
 		__field(	ino_t,	ino			)
 		__field(	int,	ret			)
 		__field(	int,	pages_written		)
-		__field(	long,	pages_skipped		)
 		__field(       pgoff_t,	writeback_index		)
 		__field(	int,	sync_mode		)
 	),
@@ -457,17 +453,15 @@ TRACE_EVENT(ext4_writepages_result,
 		__entry->ino		= inode->i_ino;
 		__entry->ret		= ret;
 		__entry->pages_written	= pages_written;
-		__entry->pages_skipped	= wbc->pages_skipped;
 		__entry->writeback_index = inode->i_mapping->writeback_index;
 		__entry->sync_mode	= wbc->sync_mode;
 	),
 
-	TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
+	TP_printk("dev %d,%d ino %lu ret %d pages_written %d "
 		  "sync_mode %d writeback_index %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->ret,
-		  __entry->pages_written, __entry->pages_skipped,
-		  __entry->sync_mode,
+		  __entry->pages_written, __entry->sync_mode,
 		  (unsigned long) __entry->writeback_index)
 );
 
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 071eb2eea350..a76d4e8e7ed5 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -230,7 +230,6 @@ DECLARE_EVENT_CLASS(wbc_class,
 	TP_STRUCT__entry(
 		__array(char, name, 32)
 		__field(long, nr_to_write)
-		__field(long, pages_skipped)
 		__field(int, sync_mode)
 		__field(int, for_kupdate)
 		__field(int, for_background)
@@ -243,7 +242,6 @@ DECLARE_EVENT_CLASS(wbc_class,
 	TP_fast_assign(
 		strncpy(__entry->name, dev_name(bdi->dev), 32);
 		__entry->nr_to_write	= wbc->nr_to_write;
-		__entry->pages_skipped	= wbc->pages_skipped;
 		__entry->sync_mode	= wbc->sync_mode;
 		__entry->for_kupdate	= wbc->for_kupdate;
 		__entry->for_background	= wbc->for_background;
@@ -253,12 +251,10 @@ DECLARE_EVENT_CLASS(wbc_class,
 		__entry->range_end	= (long)wbc->range_end;
 	),
 
-	TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d "
-		"bgrd=%d reclm=%d cyclic=%d "
-		"start=0x%lx end=0x%lx",
+	TP_printk("bdi %s: towrt=%ld mode=%d kupd=%d bgrd=%d reclm=%d "
+		"cyclic=%d start=0x%lx end=0x%lx",
 		__entry->name,
 		__entry->nr_to_write,
-		__entry->pages_skipped,
 		__entry->sync_mode,
 		__entry->for_kupdate,
 		__entry->for_background,
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index a4317da60532..ebccf20d098d 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2223,7 +2223,6 @@ EXPORT_SYMBOL(account_page_redirty);
  */
 int redirty_page_for_writepage(struct writeback_control *wbc, struct page *page)
 {
-	wbc->pages_skipped++;
 	account_page_redirty(page);
 	return __set_page_dirty_nobuffers(page);
 }
-- 
1.8.1.4

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux