diff options
-rw-r--r-- | fs/f2fs/data.c | 2 | ||||
-rw-r--r-- | include/trace/events/f2fs.h | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 21bfafaafe83..8c250a5d6f26 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -713,6 +713,8 @@ static int f2fs_read_data_page(struct file *file, struct page *page) | |||
713 | struct inode *inode = page->mapping->host; | 713 | struct inode *inode = page->mapping->host; |
714 | int ret; | 714 | int ret; |
715 | 715 | ||
716 | trace_f2fs_readpage(page, DATA); | ||
717 | |||
716 | /* If the file has inline data, try to read it directlly */ | 718 | /* If the file has inline data, try to read it directlly */ |
717 | if (f2fs_has_inline_data(inode)) | 719 | if (f2fs_has_inline_data(inode)) |
718 | ret = f2fs_read_inline_data(inode, page); | 720 | ret = f2fs_read_inline_data(inode, page); |
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 91b1fcc5ec93..b983990b4a9f 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h | |||
@@ -732,6 +732,7 @@ DECLARE_EVENT_CLASS(f2fs__page, | |||
732 | __field(int, dir) | 732 | __field(int, dir) |
733 | __field(pgoff_t, index) | 733 | __field(pgoff_t, index) |
734 | __field(int, dirty) | 734 | __field(int, dirty) |
735 | __field(int, uptodate) | ||
735 | ), | 736 | ), |
736 | 737 | ||
737 | TP_fast_assign( | 738 | TP_fast_assign( |
@@ -741,14 +742,17 @@ DECLARE_EVENT_CLASS(f2fs__page, | |||
741 | __entry->dir = S_ISDIR(page->mapping->host->i_mode); | 742 | __entry->dir = S_ISDIR(page->mapping->host->i_mode); |
742 | __entry->index = page->index; | 743 | __entry->index = page->index; |
743 | __entry->dirty = PageDirty(page); | 744 | __entry->dirty = PageDirty(page); |
745 | __entry->uptodate = PageUptodate(page); | ||
744 | ), | 746 | ), |
745 | 747 | ||
746 | TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, dirty = %d", | 748 | TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, " |
749 | "dirty = %d, uptodate = %d", | ||
747 | show_dev_ino(__entry), | 750 | show_dev_ino(__entry), |
748 | show_block_type(__entry->type), | 751 | show_block_type(__entry->type), |
749 | show_file_type(__entry->dir), | 752 | show_file_type(__entry->dir), |
750 | (unsigned long)__entry->index, | 753 | (unsigned long)__entry->index, |
751 | __entry->dirty) | 754 | __entry->dirty, |
755 | __entry->uptodate) | ||
752 | ); | 756 | ); |
753 | 757 | ||
754 | DEFINE_EVENT(f2fs__page, f2fs_writepage, | 758 | DEFINE_EVENT(f2fs__page, f2fs_writepage, |
@@ -758,6 +762,13 @@ DEFINE_EVENT(f2fs__page, f2fs_writepage, | |||
758 | TP_ARGS(page, type) | 762 | TP_ARGS(page, type) |
759 | ); | 763 | ); |
760 | 764 | ||
765 | DEFINE_EVENT(f2fs__page, f2fs_readpage, | ||
766 | |||
767 | TP_PROTO(struct page *page, int type), | ||
768 | |||
769 | TP_ARGS(page, type) | ||
770 | ); | ||
771 | |||
761 | DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty, | 772 | DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty, |
762 | 773 | ||
763 | TP_PROTO(struct page *page, int type), | 774 | TP_PROTO(struct page *page, int type), |