summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/data.c1
-rw-r--r--include/trace/events/f2fs.h12
2 files changed, 12 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2a6ae274b8de..12bf4b6e0075 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2514,6 +2514,7 @@ submit_and_realloc:
index++;
offset++;
}
+ trace_f2fs_read_folio(folio, DATA);
if (rac) {
folio = readahead_folio(rac);
goto next_folio;
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index df4017dcc701..635dcabcf1c7 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1358,6 +1358,7 @@ DECLARE_EVENT_CLASS(f2fs__folio,
__field(int, type)
__field(int, dir)
__field(pgoff_t, index)
+ __field(pgoff_t, nrpages)
__field(int, dirty)
__field(int, uptodate)
),
@@ -1368,16 +1369,18 @@ DECLARE_EVENT_CLASS(f2fs__folio,
__entry->type = type;
__entry->dir = S_ISDIR(folio->mapping->host->i_mode);
__entry->index = folio->index;
+ __entry->nrpages= folio_nr_pages(folio);
__entry->dirty = folio_test_dirty(folio);
__entry->uptodate = folio_test_uptodate(folio);
),
- TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
+ TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, nr_pages = %lu, "
"dirty = %d, uptodate = %d",
show_dev_ino(__entry),
show_block_type(__entry->type),
show_file_type(__entry->dir),
(unsigned long)__entry->index,
+ (unsigned long)__entry->nrpages,
__entry->dirty,
__entry->uptodate)
);
@@ -1403,6 +1406,13 @@ DEFINE_EVENT(f2fs__folio, f2fs_readpage,
TP_ARGS(folio, type)
);
+DEFINE_EVENT(f2fs__folio, f2fs_read_folio,
+
+ TP_PROTO(struct folio *folio, int type),
+
+ TP_ARGS(folio, type)
+);
+
DEFINE_EVENT(f2fs__folio, f2fs_set_page_dirty,
TP_PROTO(struct folio *folio, int type),