diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-12-02 16:12:54 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-09 23:49:01 +0000 |
commit | e6cb075cd37b379d97fab60eb0ecd3531523a793 (patch) | |
tree | 3ad96b333310f5e69f4375cdad5cda3d8f78ab1f /meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch | |
parent | a571272bf17114a40f96b2e553feacb35413e8ad (diff) | |
download | poky-e6cb075cd37b379d97fab60eb0ecd3531523a793.tar.gz |
lttng-modules: add post 2.11.6 patches
To fix building against the latest 5.4.x kernels (and other versions
as well), we import the lttng patches that have been added since the
2.11.6 release.
When 2.11.7 is released, we can drop these patches and go with the
release tarball.
(From OE-Core rev: ea7e3c47af4191e69d54fc519865d125ed61d8eb)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch | 316 |
1 files changed, 316 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch new file mode 100644 index 0000000000..2a100361ea --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch | |||
@@ -0,0 +1,316 @@ | |||
1 | From 5a3b76a81fd3df52405700d369223d64c7a04dc8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Jeanson <mjeanson@efficios.com> | ||
3 | Date: Tue, 27 Oct 2020 11:42:23 -0400 | ||
4 | Subject: [PATCH 03/16] fix: btrfs: tracepoints: output proper root owner for | ||
5 | trace_find_free_extent() (v5.10) | ||
6 | |||
7 | See upstream commit : | ||
8 | |||
9 | commit 437490fed3b0c9ae21af8f70e0f338d34560842b | ||
10 | Author: Qu Wenruo <wqu@suse.com> | ||
11 | Date: Tue Jul 28 09:42:49 2020 +0800 | ||
12 | |||
13 | btrfs: tracepoints: output proper root owner for trace_find_free_extent() | ||
14 | |||
15 | The current trace event always output result like this: | ||
16 | |||
17 | find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA) | ||
18 | find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA) | ||
19 | find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA) | ||
20 | find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA) | ||
21 | find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA) | ||
22 | find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA) | ||
23 | |||
24 | T's saying we're allocating data extent for EXTENT tree, which is not | ||
25 | even possible. | ||
26 | |||
27 | It's because we always use EXTENT tree as the owner for | ||
28 | trace_find_free_extent() without using the @root from | ||
29 | btrfs_reserve_extent(). | ||
30 | |||
31 | This patch will change the parameter to use proper @root for | ||
32 | trace_find_free_extent(): | ||
33 | |||
34 | Now it looks much better: | ||
35 | |||
36 | find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) | ||
37 | find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA) | ||
38 | find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=1(DATA) | ||
39 | find_free_extent: root=5(FS_TREE) len=4096 empty_size=0 flags=1(DATA) | ||
40 | find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA) | ||
41 | find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) | ||
42 | find_free_extent: root=7(CSUM_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) | ||
43 | find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) | ||
44 | find_free_extent: root=1(ROOT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) | ||
45 | |||
46 | Upstream-Status: Backport | ||
47 | |||
48 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
49 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
50 | Change-Id: I1d674064d29b31417e2acffdeb735f5052a87032 | ||
51 | --- | ||
52 | instrumentation/events/lttng-module/btrfs.h | 206 ++++++++++++-------- | ||
53 | 1 file changed, 122 insertions(+), 84 deletions(-) | ||
54 | |||
55 | diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h | ||
56 | index 7b290085..52fcfd0d 100644 | ||
57 | --- a/instrumentation/events/lttng-module/btrfs.h | ||
58 | +++ b/instrumentation/events/lttng-module/btrfs.h | ||
59 | @@ -1856,7 +1856,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f | ||
60 | |||
61 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ | ||
62 | |||
63 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) | ||
64 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \ | ||
65 | + LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \ | ||
66 | + LTTNG_KERNEL_RANGE(5,4,78, 5,5,0)) | ||
67 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
68 | + | ||
69 | + btrfs_find_free_extent, | ||
70 | + | ||
71 | + TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
72 | + u64 data), | ||
73 | + | ||
74 | + TP_ARGS(root, num_bytes, empty_size, data), | ||
75 | + | ||
76 | + TP_FIELDS( | ||
77 | + ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
78 | + ctf_integer(u64, root_objectid, root->root_key.objectid) | ||
79 | + ctf_integer(u64, num_bytes, num_bytes) | ||
80 | + ctf_integer(u64, empty_size, empty_size) | ||
81 | + ctf_integer(u64, data, data) | ||
82 | + ) | ||
83 | +) | ||
84 | + | ||
85 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) | ||
86 | + | ||
87 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
88 | |||
89 | btrfs_find_free_extent, | ||
90 | @@ -1874,6 +1896,105 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
91 | ) | ||
92 | ) | ||
93 | |||
94 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)) | ||
95 | + | ||
96 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
97 | + | ||
98 | + btrfs_find_free_extent, | ||
99 | + | ||
100 | + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
101 | + u64 data), | ||
102 | + | ||
103 | + TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
104 | + | ||
105 | + TP_FIELDS( | ||
106 | + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
107 | + ctf_integer(u64, num_bytes, num_bytes) | ||
108 | + ctf_integer(u64, empty_size, empty_size) | ||
109 | + ctf_integer(u64, data, data) | ||
110 | + ) | ||
111 | +) | ||
112 | + | ||
113 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) | ||
114 | + | ||
115 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
116 | + | ||
117 | + btrfs_find_free_extent, | ||
118 | + | ||
119 | + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
120 | + u64 data), | ||
121 | + | ||
122 | + TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
123 | + | ||
124 | + TP_FIELDS( | ||
125 | + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
126 | + ctf_integer(u64, num_bytes, num_bytes) | ||
127 | + ctf_integer(u64, empty_size, empty_size) | ||
128 | + ctf_integer(u64, data, data) | ||
129 | + ) | ||
130 | +) | ||
131 | + | ||
132 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) | ||
133 | + | ||
134 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
135 | + | ||
136 | + btrfs_find_free_extent, | ||
137 | + | ||
138 | + TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
139 | + u64 data), | ||
140 | + | ||
141 | + TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
142 | + | ||
143 | + TP_FIELDS( | ||
144 | + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
145 | + ctf_integer(u64, num_bytes, num_bytes) | ||
146 | + ctf_integer(u64, empty_size, empty_size) | ||
147 | + ctf_integer(u64, data, data) | ||
148 | + ) | ||
149 | +) | ||
150 | + | ||
151 | +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ | ||
152 | + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | ||
153 | + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | ||
154 | + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | ||
155 | + | ||
156 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
157 | + | ||
158 | + btrfs_find_free_extent, | ||
159 | + | ||
160 | + TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
161 | + u64 data), | ||
162 | + | ||
163 | + TP_ARGS(root, num_bytes, empty_size, data), | ||
164 | + | ||
165 | + TP_FIELDS( | ||
166 | + ctf_integer(u64, root_objectid, root->root_key.objectid) | ||
167 | + ctf_integer(u64, num_bytes, num_bytes) | ||
168 | + ctf_integer(u64, empty_size, empty_size) | ||
169 | + ctf_integer(u64, data, data) | ||
170 | + ) | ||
171 | +) | ||
172 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | ||
173 | + | ||
174 | +LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
175 | + | ||
176 | + btrfs_find_free_extent, | ||
177 | + | ||
178 | + TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
179 | + u64 data), | ||
180 | + | ||
181 | + TP_ARGS(root, num_bytes, empty_size, data), | ||
182 | + | ||
183 | + TP_FIELDS( | ||
184 | + ctf_integer(u64, root_objectid, root->root_key.objectid) | ||
185 | + ctf_integer(u64, num_bytes, num_bytes) | ||
186 | + ctf_integer(u64, empty_size, empty_size) | ||
187 | + ctf_integer(u64, data, data) | ||
188 | + ) | ||
189 | +) | ||
190 | +#endif | ||
191 | + | ||
192 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) | ||
193 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
194 | |||
195 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | ||
196 | @@ -1907,22 +2028,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus | ||
197 | ) | ||
198 | |||
199 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)) | ||
200 | -LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
201 | - | ||
202 | - btrfs_find_free_extent, | ||
203 | - | ||
204 | - TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
205 | - u64 data), | ||
206 | - | ||
207 | - TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
208 | - | ||
209 | - TP_FIELDS( | ||
210 | - ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
211 | - ctf_integer(u64, num_bytes, num_bytes) | ||
212 | - ctf_integer(u64, empty_size, empty_size) | ||
213 | - ctf_integer(u64, data, data) | ||
214 | - ) | ||
215 | -) | ||
216 | |||
217 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
218 | |||
219 | @@ -1957,22 +2062,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus | ||
220 | ) | ||
221 | |||
222 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) | ||
223 | -LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
224 | - | ||
225 | - btrfs_find_free_extent, | ||
226 | - | ||
227 | - TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
228 | - u64 data), | ||
229 | - | ||
230 | - TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
231 | - | ||
232 | - TP_FIELDS( | ||
233 | - ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
234 | - ctf_integer(u64, num_bytes, num_bytes) | ||
235 | - ctf_integer(u64, empty_size, empty_size) | ||
236 | - ctf_integer(u64, data, data) | ||
237 | - ) | ||
238 | -) | ||
239 | |||
240 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
241 | |||
242 | @@ -2011,23 +2100,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus | ||
243 | |||
244 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) | ||
245 | |||
246 | -LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
247 | - | ||
248 | - btrfs_find_free_extent, | ||
249 | - | ||
250 | - TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | ||
251 | - u64 data), | ||
252 | - | ||
253 | - TP_ARGS(fs_info, num_bytes, empty_size, data), | ||
254 | - | ||
255 | - TP_FIELDS( | ||
256 | - ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | ||
257 | - ctf_integer(u64, num_bytes, num_bytes) | ||
258 | - ctf_integer(u64, empty_size, empty_size) | ||
259 | - ctf_integer(u64, data, data) | ||
260 | - ) | ||
261 | -) | ||
262 | - | ||
263 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
264 | |||
265 | TP_PROTO(struct btrfs_fs_info *fs_info, | ||
266 | @@ -2066,23 +2138,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus | ||
267 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | ||
268 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | ||
269 | |||
270 | -LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
271 | - | ||
272 | - btrfs_find_free_extent, | ||
273 | - | ||
274 | - TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
275 | - u64 data), | ||
276 | - | ||
277 | - TP_ARGS(root, num_bytes, empty_size, data), | ||
278 | - | ||
279 | - TP_FIELDS( | ||
280 | - ctf_integer(u64, root_objectid, root->root_key.objectid) | ||
281 | - ctf_integer(u64, num_bytes, num_bytes) | ||
282 | - ctf_integer(u64, empty_size, empty_size) | ||
283 | - ctf_integer(u64, data, data) | ||
284 | - ) | ||
285 | -) | ||
286 | - | ||
287 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
288 | |||
289 | TP_PROTO(const struct btrfs_root *root, | ||
290 | @@ -2120,23 +2175,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus | ||
291 | |||
292 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | ||
293 | |||
294 | -LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | ||
295 | - | ||
296 | - btrfs_find_free_extent, | ||
297 | - | ||
298 | - TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | ||
299 | - u64 data), | ||
300 | - | ||
301 | - TP_ARGS(root, num_bytes, empty_size, data), | ||
302 | - | ||
303 | - TP_FIELDS( | ||
304 | - ctf_integer(u64, root_objectid, root->root_key.objectid) | ||
305 | - ctf_integer(u64, num_bytes, num_bytes) | ||
306 | - ctf_integer(u64, empty_size, empty_size) | ||
307 | - ctf_integer(u64, data, data) | ||
308 | - ) | ||
309 | -) | ||
310 | - | ||
311 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | ||
312 | |||
313 | TP_PROTO(struct btrfs_root *root, | ||
314 | -- | ||
315 | 2.25.1 | ||
316 | |||