]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
lttng-modules: fix v6.8+ build
authorYogesh Tyagi <yogesh.tyagi@intel.com>
Wed, 20 Mar 2024 06:08:18 +0000 (11:38 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Mar 2024 18:19:46 +0000 (18:19 +0000)
Backport a patch which remove 'needed' in trace_ext4_discard_preallocations

Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch [new file with mode: 0644]
meta/recipes-kernel/lttng/lttng-modules_2.13.11.bb

diff --git a/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch b/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch
new file mode 100644 (file)
index 0000000..c35f5b6
--- /dev/null
@@ -0,0 +1,52 @@
+From c1e074414f087b6ecc229a9385a44eb3b3dfeaea Mon Sep 17 00:00:00 2001
+From: Kienan Stewart <kstewart@efficios.com>
+Date: Mon, 5 Feb 2024 08:52:29 -0500
+Subject: [PATCH] Fix: ext4_discard_preallocations changed in linux 6.8.0-rc3
+
+See upstream commit:
+
+    commit f0e54b6087de9571ec61c189d6c378b81edbe3b2
+    Author: Kemeng Shi <shikemeng@huaweicloud.com>
+    Date:   Fri Jan 5 17:21:02 2024 +0800
+
+        ext4: remove 'needed' in trace_ext4_discard_preallocations
+
+        As 'needed' to trace_ext4_discard_preallocations is always 0 which
+        is meaningless. Just remove it.
+
+Change-Id: Ib6b698ca553c4beebd4ca791c83bbbb927901758
+Signed-off-by: Kienan Stewart <kstewart@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/2da4de37de6382b4440737fdf4320e08a089afcd]
+
+Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
+---
+ include/instrumentation/events/ext4.h | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h
+index 222416e..05a6453 100644
+--- a/include/instrumentation/events/ext4.h
++++ b/include/instrumentation/events/ext4.h
+@@ -490,7 +490,19 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
+ )
+ #endif
+-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
++LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
++      TP_PROTO(struct inode *inode, unsigned int len),
++
++      TP_ARGS(inode, len),
++
++      TP_FIELDS(
++              ctf_integer(dev_t, dev, inode->i_sb->s_dev)
++              ctf_integer(ino_t, ino, inode->i_ino)
++              ctf_integer(unsigned int, len, len)
++      )
++)
++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
+       LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
+ LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
+       TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
index b6bae733c750ecc10b0ac350af9cda77a6a89889..5d2379df8481ef4cfbc5b6ec29ebc03c2b428bb3 100644 (file)
@@ -15,6 +15,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch \
            file://0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch \
            file://0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch \
+           file://0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch \
         "
 
 # Use :append here so that the patch is applied also when using devupstream