summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch189
1 files changed, 189 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch
new file mode 100644
index 0000000000..c835d06cf5
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-update-ext4-instrumentation-for-kernel-4.13.patch
@@ -0,0 +1,189 @@
1From 500c99a45fc0da09d1dc7b9e62bf58d562856a9a Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 21 Aug 2017 14:47:08 -0400
4Subject: [PATCH 4/8] Fix: update ext4 instrumentation for kernel 4.13
5Organization: O.S. Systems Software LTDA.
6
7See this upstream commit :
8
9 commit a627b0a7c15ee4d2c87a86d5be5c8167382e8d0d
10 Author: Eric Whitney <enwlinux@gmail.com>
11 Date: Sun Jul 30 22:30:11 2017 -0400
12
13 ext4: remove unused metadata accounting variables
14
15 Two variables in ext4_inode_info, i_reserved_meta_blocks and
16 i_allocated_meta_blocks, are unused. Removing them saves a little
17 memory per in-memory inode and cleans up clutter in several tracepoints.
18 Adjust tracepoint output from ext4_alloc_da_blocks() for consistency
19 and fix a typo and whitespace near these changes.
20
21Upstream-Status: Backport [2.9.4]
22
23 Signed-off-by: Eric Whitney <enwlinux@gmail.com>
24 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
25 Reviewed-by: Jan Kara <jack@suse.cz>
26
27Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
28Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
29---
30 instrumentation/events/lttng-module/ext4.h | 96 ++++++++++++++++++++++++++----
31 1 file changed, 86 insertions(+), 10 deletions(-)
32
33diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
34index e87b534..fe6f802 100644
35--- a/instrumentation/events/lttng-module/ext4.h
36+++ b/instrumentation/events/lttng-module/ext4.h
37@@ -689,6 +689,19 @@ LTTNG_TRACEPOINT_EVENT(ext4_sync_fs,
38 )
39 )
40
41+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
42+LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
43+ TP_PROTO(struct inode *inode),
44+
45+ TP_ARGS(inode),
46+
47+ TP_FIELDS(
48+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
49+ ctf_integer(ino_t, ino, inode->i_ino)
50+ ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks)
51+ )
52+)
53+#else
54 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
55 TP_PROTO(struct inode *inode),
56
57@@ -701,6 +714,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
58 ctf_integer(unsigned int, meta_blocks, EXT4_I(inode)->i_reserved_meta_blocks)
59 )
60 )
61+#endif
62
63 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc,
64 TP_PROTO(struct ext4_allocation_context *ac),
65@@ -833,17 +847,49 @@ LTTNG_TRACEPOINT_EVENT(ext4_forget,
66 )
67 #endif
68
69-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
70+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
71 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
72-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
73 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
74
75 TP_ARGS(inode, used_blocks, quota_claim),
76-#else
77+
78+ TP_FIELDS(
79+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
80+ ctf_integer(ino_t, ino, inode->i_ino)
81+ ctf_integer(__u64, i_blocks, inode->i_blocks)
82+ ctf_integer(int, used_blocks, used_blocks)
83+ ctf_integer(int, reserved_data_blocks,
84+ EXT4_I(inode)->i_reserved_data_blocks)
85+ ctf_integer(int, quota_claim, quota_claim)
86+ ctf_integer(TP_MODE_T, mode, inode->i_mode)
87+ )
88+)
89+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
90+LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
91+ TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
92+
93+ TP_ARGS(inode, used_blocks, quota_claim),
94+
95+ TP_FIELDS(
96+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
97+ ctf_integer(ino_t, ino, inode->i_ino)
98+ ctf_integer(__u64, i_blocks, inode->i_blocks)
99+ ctf_integer(int, used_blocks, used_blocks)
100+ ctf_integer(int, reserved_data_blocks,
101+ EXT4_I(inode)->i_reserved_data_blocks)
102+ ctf_integer(int, reserved_meta_blocks,
103+ EXT4_I(inode)->i_reserved_meta_blocks)
104+ ctf_integer(int, allocated_meta_blocks,
105+ EXT4_I(inode)->i_allocated_meta_blocks)
106+ ctf_integer(int, quota_claim, quota_claim)
107+ ctf_integer(TP_MODE_T, mode, inode->i_mode)
108+ )
109+)
110+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
111+LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
112 TP_PROTO(struct inode *inode, int used_blocks),
113
114 TP_ARGS(inode, used_blocks),
115-#endif
116
117 TP_FIELDS(
118 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
119@@ -856,14 +902,27 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
120 EXT4_I(inode)->i_reserved_meta_blocks)
121 ctf_integer(int, allocated_meta_blocks,
122 EXT4_I(inode)->i_allocated_meta_blocks)
123-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
124- ctf_integer(int, quota_claim, quota_claim)
125-#endif
126 ctf_integer(TP_MODE_T, mode, inode->i_mode)
127 )
128 )
129+#endif
130
131-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
132+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
133+LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
134+ TP_PROTO(struct inode *inode),
135+
136+ TP_ARGS(inode),
137+
138+ TP_FIELDS(
139+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
140+ ctf_integer(ino_t, ino, inode->i_ino)
141+ ctf_integer(__u64, i_blocks, inode->i_blocks)
142+ ctf_integer(int, reserved_data_blocks,
143+ EXT4_I(inode)->i_reserved_data_blocks)
144+ ctf_integer(TP_MODE_T, mode, inode->i_mode)
145+ )
146+)
147+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
148 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
149 TP_PROTO(struct inode *inode),
150
151@@ -880,7 +939,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
152 ctf_integer(TP_MODE_T, mode, inode->i_mode)
153 )
154 )
155-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
156+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
157 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
158 TP_PROTO(struct inode *inode, int md_needed),
159
160@@ -898,8 +957,25 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
161 ctf_integer(TP_MODE_T, mode, inode->i_mode)
162 )
163 )
164-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
165+#endif
166+
167+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
168+LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
169+ TP_PROTO(struct inode *inode, int freed_blocks),
170+
171+ TP_ARGS(inode, freed_blocks),
172
173+ TP_FIELDS(
174+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
175+ ctf_integer(ino_t, ino, inode->i_ino)
176+ ctf_integer(__u64, i_blocks, inode->i_blocks)
177+ ctf_integer(int, freed_blocks, freed_blocks)
178+ ctf_integer(int, reserved_data_blocks,
179+ EXT4_I(inode)->i_reserved_data_blocks)
180+ ctf_integer(TP_MODE_T, mode, inode->i_mode)
181+ )
182+)
183+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
184 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
185 TP_PROTO(struct inode *inode, int freed_blocks),
186
187--
1882.14.1
189