summaryrefslogtreecommitdiff
path: root/fs/f2fs/trace.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-12-17 19:51:57 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-01-09 17:02:24 -0800
commit0e689d036952a6018ed5f5c1aee7697f5c57cea1 (patch)
tree122bcbe75e1d313887bf6bf1c51fd4fac54854a7 /fs/f2fs/trace.h
parent63f92ddc8aee18838441179064338702a93326a9 (diff)
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 <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/trace.h')
-rw-r--r--fs/f2fs/trace.h18
1 files changed, 18 insertions, 0 deletions
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 <trace/events/f2fs.h>
+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