blob: 2843c9cb621b8b14efd4b2e421c54fd9e87de896 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001From eae02feb58064eee5ce15a9f6bdffd107c47da05 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 31 Aug 2020 11:41:38 -0400
4Subject: [PATCH 07/10] fix: writeback: Drop I_DIRTY_TIME_EXPIRE (v5.9)
5
6See upstream commit:
7
8 commit 5fcd57505c002efc5823a7355e21f48dd02d5a51
9 Author: Jan Kara <jack@suse.cz>
10 Date: Fri May 29 16:24:43 2020 +0200
11
12 writeback: Drop I_DIRTY_TIME_EXPIRE
13
14 The only use of I_DIRTY_TIME_EXPIRE is to detect in
15 __writeback_single_inode() that inode got there because flush worker
16 decided it's time to writeback the dirty inode time stamps (either
17 because we are syncing or because of age). However we can detect this
18 directly in __writeback_single_inode() and there's no need for the
19 strange propagation with I_DIRTY_TIME_EXPIRE flag.
20
21Upstream-Status: Backport
22
23Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
24Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
25Change-Id: I92e37c2ff3ec36d431e8f9de5c8e37c5a2da55ea
26---
27 instrumentation/events/lttng-module/writeback.h | 16 +++++++++++++++-
28 1 file changed, 15 insertions(+), 1 deletion(-)
29
30diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
31index affb4eb..ece67ad 100644
32--- a/instrumentation/events/lttng-module/writeback.h
33+++ b/instrumentation/events/lttng-module/writeback.h
34@@ -46,7 +46,21 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
35
36 #endif
37
38-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
39+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
40+#define show_inode_state(state) \
41+ __print_flags(state, "|", \
42+ {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
43+ {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \
44+ {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \
45+ {I_NEW, "I_NEW"}, \
46+ {I_WILL_FREE, "I_WILL_FREE"}, \
47+ {I_FREEING, "I_FREEING"}, \
48+ {I_CLEAR, "I_CLEAR"}, \
49+ {I_SYNC, "I_SYNC"}, \
50+ {I_DIRTY_TIME, "I_DIRTY_TIME"}, \
51+ {I_REFERENCED, "I_REFERENCED"} \
52+ )
53+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
54 #define show_inode_state(state) \
55 __print_flags(state, "|", \
56 {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
57--
582.19.1
59