summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-04-03 14:10:32 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-04 14:05:03 +0100
commitacdb1bb14e15947c5e4dd0f30270a0eaa7083edb (patch)
tree2471c505ff0abd574c740181999ce5f1902f90ce /meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
parent0447fc142b0e5699a5b4ba076dabf07f58d666fd (diff)
downloadpoky-acdb1bb14e15947c5e4dd0f30270a0eaa7083edb.tar.gz
lttng-modules: update to v2.13.12
We drop our previously backported patches for v6.8 kernels as they are part of the 2.13.12 release of lttng and we add backports for v6.9+ kernels. Bumping lttng-modules to version v2.13.12-7-g52eb2ee9, which comprises the following commits: 52eb2ee9 Fix: dev_base_lock removed in linux 6.9-rc1 175fe77c Fix: mm_compaction_migratepages changed in linux 6.9-rc1 303434ab Fix: ASoC add component to set_bias_level events in linux 6.9-rc1 88c4e0fe Fix: ASoC snd_doc_dapm on linux 6.9-rc1 578ab207 Fix: build kvm probe on EL 8.4+ 057ad399 Fix: support ext4_journal_start on EL 8.4+ 3ca21738 Fix: correct RHEL range for kmem_cache_free define 4ba4f0ec Version 2.13.12 1124749b docs: Add supported versions and fix-backport policy c302cf1d docs: Add links to project resources d6b75831 Fix: Correct minimum version in jbd2 SLE kernel range 9e6736d6 Fix: Handle recent SLE major version codes 5d331562 Fix: build on sles15sp4 f6800492 Compile fixes for RHEL 9.3 kernels d988f04a Fix: ext4_discard_preallocations changed in linux 6.8.0-rc3 616c60b9 Fix: btrfs_get_extent flags and compress_type changed in linux 6.8.0-rc1 8d195927 Fix: btrfs_chunk tracepoints changed in linux 6.8.0-rc1 7e8d89d1 Fix: strlcpy removed in linux 6.8.0-rc1 f4c1678d Fix: timer_start changed in linux 6.8.0-rc1 60a1e809 Fix: sched_stat_runtime changed in linux 6.8.0-rc1 (From OE-Core rev: f8be1a87f1a7e7de714d19a6b3afe59e6f177e7d) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch88
1 files changed, 0 insertions, 88 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch b/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
deleted file mode 100644
index 65c33dafef..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From 86db094386b43bb5c6b47552f9a4826ca8ba917d Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 13:13:36 -0500
4Subject: [PATCH 5/5] Fix: btrfs_get_extent flags and compress_type changed in
5 linux 6.8.0-rc1
6
7See upstream commit:
8
9 commit f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9
10 Author: Filipe Manana <fdmanana@suse.com>
11 Date: Mon Dec 4 16:20:33 2023 +0000
12
13 btrfs: use the flags of an extent map to identify the compression type
14
15 Currently, in struct extent_map, we use an unsigned int (32 bits) to
16 identify the compression type of an extent and an unsigned long (64 bits
17 on a 64 bits platform, 32 bits otherwise) for flags. We are only using
18 6 different flags, so an unsigned long is excessive and we can use flags
19 to identify the compression type instead of using a dedicated 32 bits
20 field.
21
22 We can easily have tens or hundreds of thousands (or more) of extent maps
23 on busy and large filesystems, specially with compression enabled or many
24 or large files with tons of small extents. So it's convenient to have the
25 extent_map structure as small as possible in order to use less memory.
26
27 So remove the compression type field from struct extent_map, use flags
28 to identify the compression type and shorten the flags field from an
29 unsigned long to a u32. This saves 8 bytes (on 64 bits platforms) and
30 reduces the size of the structure from 136 bytes down to 128 bytes, using
31 now only two cache lines, and increases the number of extent maps we can
32 have per 4K page from 30 to 32. By using a u32 for the flags instead of
33 an unsigned long, we no longer use test_bit(), set_bit() and clear_bit(),
34 but that level of atomicity is not needed as most flags are never cleared
35 once set (before adding an extent map to the tree), and the ones that can
36 be cleared or set after an extent map is added to the tree, are always
37 performed while holding the write lock on the extent map tree, while the
38 reader holds a lock on the tree or tests for a flag that never changes
39 once the extent map is in the tree (such as compression flags).
40
41Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
42
43Change-Id: I95402d43f064c016b423b48652e4968d3db9b8a9
44Signed-off-by: Kienan Stewart <kstewart@efficios.com>
45Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
46---
47 include/instrumentation/events/btrfs.h | 25 ++++++++++++++++++++++++-
48 1 file changed, 24 insertions(+), 1 deletion(-)
49
50diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
51index a2a412b..ffb1b64 100644
52--- a/include/instrumentation/events/btrfs.h
53+++ b/include/instrumentation/events/btrfs.h
54@@ -177,7 +177,30 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
55 )
56 #endif
57
58-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
59+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
60+
61+LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
62+
63+ TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
64+ const struct extent_map *map),
65+
66+ TP_ARGS(root, inode, map),
67+
68+ TP_FIELDS(
69+ ctf_integer(u64, root_objectid, root->root_key.objectid)
70+ ctf_integer(u64, ino, btrfs_ino(inode))
71+ ctf_integer(u64, start, map->start)
72+ ctf_integer(u64, len, map->len)
73+ ctf_integer(u64, orig_start, map->orig_start)
74+ ctf_integer(u64, block_start, map->block_start)
75+ ctf_integer(u64, block_len, map->block_len)
76+ ctf_integer(unsigned int, flags, map->flags)
77+ ctf_integer(int, refs, refcount_read(&map->refs))
78+ ctf_integer(unsigned int, compress_type, extent_map_compression(map))
79+ )
80+)
81+
82+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
83
84 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
85
86--
872.39.2
88