1 vfs: add lazytime tracepoints for better debugging
3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
5 fs/fs-writeback.c | 5 ++++-
7 2 files changed, 9 insertions(+), 1 deletion(-)
9 diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
10 index eb04277..cab2d6d 100644
11 --- a/fs/fs-writeback.c
12 +++ b/fs/fs-writeback.c
14 #include <linux/backing-dev.h>
15 #include <linux/tracepoint.h>
16 #include <linux/device.h>
17 +#include <trace/events/fs.h>
21 @@ -1304,8 +1305,10 @@ static void flush_sb_dirty_time(struct super_block *sb)
27 + trace_fs_lazytime_flush(inode);
28 mark_inode_dirty(inode);
31 spin_lock(&inode_sb_list_lock);
33 diff --git a/fs/inode.c b/fs/inode.c
34 index 321c7d7..bd6e0e6 100644
38 #include <linux/list_lru.h>
41 +#define CREATE_TRACE_POINTS
42 +#include <trace/events/fs.h>
45 * Inode locking rules:
47 @@ -544,6 +547,7 @@ static void evict(struct inode *inode)
48 mark_inode_dirty(inode);
49 inode->i_sb->s_op->write_inode(inode, &wbc);
51 + trace_fs_lazytime_evict(inode);
54 if (!list_empty(&inode->i_wb_list))
55 @@ -1550,6 +1554,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
56 inode->i_state |= I_DIRTY_TIME;
57 spin_unlock(&inode->i_lock);
58 inode->i_ts_dirty_day = days_since_boot;
59 + trace_fs_lazytime_defer(inode);