summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch116
1 files changed, 0 insertions, 116 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch
deleted file mode 100644
index 8ecdccf609..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch
+++ /dev/null
@@ -1,116 +0,0 @@
1From d0eeda3f84ba1643831561a2488ca2e99e9472b1 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 7 Mar 2023 11:26:25 -0500
4Subject: [PATCH 3/4] fix: btrfs: pass find_free_extent_ctl to allocator
5 tracepoints (v6.3)
6
7See upstream commit :
8
9 commit cfc2de0fce015d4249c674ef9f5e0b4817ba5c53
10 Author: Boris Burkov <boris@bur.io>
11 Date: Thu Dec 15 16:06:31 2022 -0800
12
13 btrfs: pass find_free_extent_ctl to allocator tracepoints
14
15 The allocator tracepoints currently have a pile of values from ffe_ctl.
16 In modifying the allocator and adding more tracepoints, I found myself
17 adding to the already long argument list of the tracepoints. It makes it
18 a lot simpler to just send in the ffe_ctl itself.
19
20Upstream-Status: Backport
21
22Change-Id: Iab4132a9d3df3a6369591a50fb75374b1e399fa4
23Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
24Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
25---
26 include/instrumentation/events/btrfs.h | 60 +++++++++++++++++++++++++-
27 1 file changed, 58 insertions(+), 2 deletions(-)
28
29diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
30index 01157107..7c7b9b0c 100644
31--- a/include/instrumentation/events/btrfs.h
32+++ b/include/instrumentation/events/btrfs.h
33@@ -13,6 +13,10 @@
34 #include <../fs/btrfs/accessors.h>
35 #endif
36
37+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
38+#include <../fs/btrfs/extent-tree.h>
39+#endif
40+
41 #ifndef _TRACE_BTRFS_DEF_
42 #define _TRACE_BTRFS_DEF_
43 struct btrfs_root;
44@@ -1963,7 +1967,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
45
46 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
47
48-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
49+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
50+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
51+
52+ btrfs_find_free_extent,
53+
54+ TP_PROTO(const struct btrfs_root *root,
55+ const struct find_free_extent_ctl *ffe_ctl),
56+
57+ TP_ARGS(root, ffe_ctl),
58+
59+ TP_FIELDS(
60+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
61+ ctf_integer(u64, root_objectid, root->root_key.objectid)
62+ ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
63+ ctf_integer(u64, empty_size, ffe_ctl->empty_size)
64+ ctf_integer(u64, flags, ffe_ctl->flags)
65+ )
66+)
67+
68+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
69 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
70 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
71 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
72@@ -2102,7 +2125,40 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
73 )
74 #endif
75
76-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
77+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
78+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
79+
80+ TP_PROTO(const struct btrfs_block_group *block_group,
81+ const struct find_free_extent_ctl *ffe_ctl),
82+
83+ TP_ARGS(block_group, ffe_ctl),
84+
85+ TP_FIELDS(
86+ ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
87+ ctf_integer(u64, bg_objectid, block_group->start)
88+ ctf_integer(u64, flags, block_group->flags)
89+ ctf_integer(u64, start, ffe_ctl->search_start)
90+ ctf_integer(u64, len, ffe_ctl->num_bytes)
91+ )
92+)
93+
94+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
95+
96+ TP_PROTO(const struct btrfs_block_group *block_group,
97+ const struct find_free_extent_ctl *ffe_ctl),
98+
99+ TP_ARGS(block_group, ffe_ctl)
100+)
101+
102+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
103+
104+ TP_PROTO(const struct btrfs_block_group *block_group,
105+ const struct find_free_extent_ctl *ffe_ctl),
106+
107+ TP_ARGS(block_group, ffe_ctl)
108+)
109+
110+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
111 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
112
113 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
114--
1152.34.1
116