mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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.
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
This commit is contained in:
parent
ecda0de343
commit
e574843438
4 changed files with 70 additions and 0 deletions
|
|
@ -186,6 +186,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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue