Skip to contentSkip to conversation

f2fs: add a tracepoint for f2fs_write_{meta,node,data}_pages

PATCH In review Chao Yu 1 participant 1 message May 6, 2014

Subsystems (3)
lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 4/6 f2fs: add a tracepoint for f2fs_write_{meta,node,data}_pages

This patch adds a tracepoint for f2fs_write_{meta,node,data}_pages to trace when pages are fsyncing/flushing.

---
 fs/f2fs/checkpoint.c        |    2 ++
 fs/f2fs/data.c              |    2 ++
 fs/f2fs/node.c              |    2 ++
 include/trace/events/f2fs.h |   64 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 70 insertions(+)
fs/f2fs/checkpoint.c +2 -0
index 7962aaf..acf057a 100644
@@ -189,6 +189,8 @@ static int f2fs_write_meta_pages(struct address_space *mapping,
 	struct f2fs_sb_info *sbi = F2FS_SB(mapping->host->i_sb);
 	long diff, written;
 
+	trace_f2fs_writepages(mapping->host, wbc, META);
+
 	/* collect a number of dirty meta pages and write together */
 	if (wbc->for_kupdate ||
 		get_pages(sbi, F2FS_DIRTY_META) < nr_pages_to_skip(sbi, META))
fs/f2fs/data.c +2 -0
index b997d55..21bfafa 100644
@@ -860,6 +860,8 @@ static int f2fs_write_data_pages(struct address_space *mapping,
 	int ret;
 	long diff;
 
+	trace_f2fs_writepages(mapping->host, wbc, DATA);
+
 	/* deal with chardevs and other special file */
 	if (!mapping->a_ops->writepage)
 		return 0;
fs/f2fs/node.c +2 -0
index 49bdddb..3d60d3d 100644
@@ -1242,6 +1242,8 @@ static int f2fs_write_node_pages(struct address_space *mapping,
 	struct f2fs_sb_info *sbi = F2FS_SB(mapping->host->i_sb);
 	long diff;
 
+	trace_f2fs_writepages(mapping->host, wbc, NODE);
+
 	/* balancing f2fs's metadata in background */
 	f2fs_balance_fs_bg(sbi);
 
include/trace/events/f2fs.h +64 -0

70 lines not on this page · raw message

Signature · 1 line
1.7.9.5