summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-ext4_da_reserve_space-changed-in-6.11-rc1.patch
blob: 94582cd47bd6e3a8ead87f4d2b0c22a27898ef63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 7f0f61083a9e88abb289c7575586178739e94955 Mon Sep 17 00:00:00 2001
From: Kienan Stewart <kstewart@efficios.com>
Date: Mon, 29 Jul 2024 14:08:32 +0000
Subject: [PATCH 2/6] Fix: ext4_da_reserve_space changed in 6.11-rc1

See upstream commit:

    commit 0d66b23d79c750276f791411d81a524549a64852
    Author: Zhang Yi <yi.zhang@huawei.com>
    Date:   Fri May 17 20:40:02 2024 +0800

        ext4: make ext4_da_reserve_space() reserve multi-clusters

        Add 'nr_resv' parameter to ext4_da_reserve_space(), which indicates the
        number of clusters wants to reserve, make it reserve multiple clusters
        at a time.

Upstream-Status: Backport

Change-Id: Ib1ce8c3023d53a6d22ec444a435fdb3c871f64c5
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
 include/instrumentation/events/ext4.h | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h
index 462b11bf..addf2246 100644
--- a/include/instrumentation/events/ext4.h
+++ b/include/instrumentation/events/ext4.h
@@ -730,7 +730,23 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
 )
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,11,0))
+LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
+	TP_PROTO(struct inode *inode, int nr_resv),
+
+	TP_ARGS(inode, nr_resv),
+
+	TP_FIELDS(
+		ctf_integer(dev_t, dev, inode->i_sb->s_dev)
+		ctf_integer(ino_t, ino, inode->i_ino)
+		ctf_integer(__u64, i_blocks, inode->i_blocks)
+		ctf_integer(__u64, nr_resv, nr_resv)
+		ctf_integer(int, reserved_data_blocks,
+				EXT4_I(inode)->i_reserved_data_blocks)
+		ctf_integer(TP_MODE_T, mode, inode->i_mode)
+	)
+)
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
 	TP_PROTO(struct inode *inode),
 
-- 
2.39.2