From 0e689d036952a6018ed5f5c1aee7697f5c57cea1 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 17 Dec 2014 19:51:57 -0800 Subject: f2fs: add key functions for f2fs_io_tracer This patch adds two key functions to trace process ids and IOs. The basic idea is to 1. remain process ids, pids, in page->private. 2. show pids in IO traces. So, later we can retrieve process information according to IO traces. Signed-off-by: Jaegeuk Kim --- fs/f2fs/trace.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'fs/f2fs/trace.h') diff --git a/fs/f2fs/trace.h b/fs/f2fs/trace.h index 08856a978d6b..aa6663be528c 100644 --- a/fs/f2fs/trace.h +++ b/fs/f2fs/trace.h @@ -14,6 +14,24 @@ #ifdef CONFIG_F2FS_IO_TRACE #include +enum file_type { + __NORMAL_FILE, + __DIR_FILE, + __NODE_FILE, + __META_FILE, + __ATOMIC_FILE, + __VOLATILE_FILE, + __MISC_FILE, +}; + +struct last_io_info { + int major, minor; + pid_t pid; + enum file_type type; + struct f2fs_io_info fio; + block_t len; +}; + extern void f2fs_trace_pid(struct page *); extern void f2fs_trace_ios(struct page *, struct f2fs_io_info *, int); #else -- cgit v1.2.3