diff -Nru lttng-modules-2.10.8/debian/changelog lttng-modules-2.10.8/debian/changelog --- lttng-modules-2.10.8/debian/changelog 2022-09-08 10:14:15.000000000 +0200 +++ lttng-modules-2.10.8/debian/changelog 2023-02-10 08:56:19.000000000 +0100 @@ -1,3 +1,13 @@ +lttng-modules (2.10.8-1ubuntu2~18.04.5) bionic; urgency=medium + + * Backport fixes to jbd2 format in 5.4.229 (LP: #2006755) + - d/p/0016-fix-jbd2-use-the-correct-print-format.patch + - d/p/0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch + - d/p/0018-fix-jbd2-upper-bound-for-v5.10.163.patch + - d/p/0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch + + -- Roxana Nicolescu Fri, 10 Feb 2023 09:56:19 +0200 + lttng-modules (2.10.8-1ubuntu2~18.04.4) bionic; urgency=medium * Backport upstream fix to handle removal of random tracepoints in the diff -Nru lttng-modules-2.10.8/debian/patches/0016-fix-jbd2-use-the-correct-print-format.patch lttng-modules-2.10.8/debian/patches/0016-fix-jbd2-use-the-correct-print-format.patch --- lttng-modules-2.10.8/debian/patches/0016-fix-jbd2-use-the-correct-print-format.patch 1970-01-01 01:00:00.000000000 +0100 +++ lttng-modules-2.10.8/debian/patches/0016-fix-jbd2-use-the-correct-print-format.patch 2023-02-10 08:56:19.000000000 +0100 @@ -0,0 +1,149 @@ +From aafa8baece5a15d71b21f37e1f313b9ab328a2d5 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Thu, 12 Jan 2023 13:52:22 -0500 +Subject: [PATCH 1/4] fix: jbd2: use the correct print format + +See upstream commit : + + commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 + Author: Bixuan Cui + Date: Tue Oct 11 19:33:44 2022 +0800 + + jbd2: use the correct print format + + The print format error was found when using ftrace event: + <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368 + <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0 + + Use the correct print format for transaction, head and tid. + +Change-Id: Ic053f0e0c1e24ebc75bae51d07696aaa5e1c0094 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +(cherry picked from commit b28830a0dcdf95ec3e6b390b4d032667deaad0c0) +Signed-off-by: Roxana Nicolescu + +Origin: upstream, https://git.lttng.org/?p=lttng-modules.git;a=commit;h=b28830a0dcdf95ec3e6b390b4d032667deaad0c0 +--- + instrumentation/events/lttng-module/jbd2.h | 77 +++++++++++++++++++++- + 1 file changed, 76 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h +index 3ba79623..c85ed673 100644 +--- a/instrumentation/events/lttng-module/jbd2.h ++++ b/instrumentation/events/lttng-module/jbd2.h +@@ -28,6 +28,23 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ ++ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ ++ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) ++LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit, ++ ++ TP_PROTO(journal_t *journal, transaction_t *commit_transaction), ++ ++ TP_ARGS(journal, commit_transaction), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) ++ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) ++ ctf_integer(tid_t, transaction, commit_transaction->t_tid) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit, + + TP_PROTO(journal_t *journal, transaction_t *commit_transaction), +@@ -40,6 +57,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit, + ctf_integer(int, transaction, commit_transaction->t_tid) + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_start_commit, + +@@ -78,6 +96,23 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, + ) + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ ++ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ ++ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) ++LTTNG_TRACEPOINT_EVENT(jbd2_end_commit, ++ TP_PROTO(journal_t *journal, transaction_t *commit_transaction), ++ ++ TP_ARGS(journal, commit_transaction), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) ++ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) ++ ctf_integer(tid_t, transaction, commit_transaction->t_tid) ++ ctf_integer(tid_t, head, journal->j_tail_sequence) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT(jbd2_end_commit, + TP_PROTO(journal_t *journal, transaction_t *commit_transaction), + +@@ -90,6 +125,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_end_commit, + ctf_integer(int, head, journal->j_tail_sequence) + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + TP_PROTO(struct inode *inode), +@@ -102,7 +138,46 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + ) + ) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ ++ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ ++ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) ++LTTNG_TRACEPOINT_EVENT(jbd2_run_stats, ++ TP_PROTO(dev_t dev, tid_t tid, ++ struct transaction_run_stats_s *stats), ++ ++ TP_ARGS(dev, tid, stats), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, dev) ++ ctf_integer(tid_t, tid, tid) ++ ctf_integer(unsigned long, wait, stats->rs_wait) ++ ctf_integer(unsigned long, running, stats->rs_running) ++ ctf_integer(unsigned long, locked, stats->rs_locked) ++ ctf_integer(unsigned long, flushing, stats->rs_flushing) ++ ctf_integer(unsigned long, logging, stats->rs_logging) ++ ctf_integer(__u32, handle_count, stats->rs_handle_count) ++ ctf_integer(__u32, blocks, stats->rs_blocks) ++ ctf_integer(__u32, blocks_logged, stats->rs_blocks_logged) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats, ++ TP_PROTO(dev_t dev, tid_t tid, ++ struct transaction_chp_stats_s *stats), ++ ++ TP_ARGS(dev, tid, stats), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, dev) ++ ctf_integer(tid_t, tid, tid) ++ ctf_integer(unsigned long, chp_time, stats->cs_chp_time) ++ ctf_integer(__u32, forced_to_close, stats->cs_forced_to_close) ++ ctf_integer(__u32, written, stats->cs_written) ++ ctf_integer(__u32, dropped, stats->cs_dropped) ++ ) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + LTTNG_TRACEPOINT_EVENT(jbd2_run_stats, + TP_PROTO(dev_t dev, unsigned long tid, + struct transaction_run_stats_s *stats), +-- +2.34.1 + diff -Nru lttng-modules-2.10.8/debian/patches/0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch lttng-modules-2.10.8/debian/patches/0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch --- lttng-modules-2.10.8/debian/patches/0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch 1970-01-01 01:00:00.000000000 +0100 +++ lttng-modules-2.10.8/debian/patches/0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch 2023-02-10 08:56:19.000000000 +0100 @@ -0,0 +1,61 @@ +From 6b80bbef64fd7c6efa962bff2de95e43e1222ac7 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 17 Jan 2023 11:03:12 -0500 +Subject: [PATCH 2/4] fix: jbd2: use the correct print format (v5.10.163) + +See upstream commit : + + commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 + Author: Bixuan Cui + Date: Tue Oct 11 19:33:44 2022 +0800 + + jbd2: use the correct print format + + The print format error was found when using ftrace event: + <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368 + <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0 + + Use the correct print format for transaction, head and tid. + +Change-Id: I7601f5cbb86495c2607be7b11e02724c90b3ebf9 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +(cherry picked from commit dd7be14bd04c1de309ba267097b03a308da87dae) +Signed-off-by: Roxana Nicolescu + +Origin: upstream, https://git.lttng.org/?p=lttng-modules.git;a=commit;h=dd7be14bd04c1de309ba267097b03a308da87dae +--- + instrumentation/events/lttng-module/jbd2.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h +index c85ed673..750c048f 100644 +--- a/instrumentation/events/lttng-module/jbd2.h ++++ b/instrumentation/events/lttng-module/jbd2.h +@@ -29,6 +29,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +@@ -97,6 +98,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, + #endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +@@ -139,6 +141,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +-- +2.34.1 + diff -Nru lttng-modules-2.10.8/debian/patches/0018-fix-jbd2-upper-bound-for-v5.10.163.patch lttng-modules-2.10.8/debian/patches/0018-fix-jbd2-upper-bound-for-v5.10.163.patch --- lttng-modules-2.10.8/debian/patches/0018-fix-jbd2-upper-bound-for-v5.10.163.patch 1970-01-01 01:00:00.000000000 +0100 +++ lttng-modules-2.10.8/debian/patches/0018-fix-jbd2-upper-bound-for-v5.10.163.patch 2023-02-10 08:56:19.000000000 +0100 @@ -0,0 +1,52 @@ +From 656c0b1a5e1028c705980c34be77b4b8b13c430f Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 17 Jan 2023 12:16:04 -0500 +Subject: [PATCH 3/4] fix: jbd2 upper bound for v5.10.163 + +Use the correct upper bound of 5,11,0. + +Change-Id: I435b44b940c7346ed8c3ef0d445365ed156702d0 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +(cherry picked from commit 4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf) +Signed-off-by: Roxana Nicolescu + +Origin: upstream, https://git.lttng.org/?p=lttng-modules.git;a=commit;h=4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf +--- + instrumentation/events/lttng-module/jbd2.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h +index 750c048f..d44256b9 100644 +--- a/instrumentation/events/lttng-module/jbd2.h ++++ b/instrumentation/events/lttng-module/jbd2.h +@@ -29,7 +29,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ +- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +@@ -98,7 +98,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, + #endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ +- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +@@ -141,7 +141,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ +- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ ++ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ + || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) +-- +2.34.1 + diff -Nru lttng-modules-2.10.8/debian/patches/0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch lttng-modules-2.10.8/debian/patches/0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch --- lttng-modules-2.10.8/debian/patches/0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch 1970-01-01 01:00:00.000000000 +0100 +++ lttng-modules-2.10.8/debian/patches/0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch 2023-02-10 08:56:19.000000000 +0100 @@ -0,0 +1,63 @@ +From 8b5138c9bcb4796d7a9f9fa1c191a9d0baa28086 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Wed, 18 Jan 2023 16:32:04 -0500 +Subject: [PATCH 4/4] fix: jbd2: use the correct print format (v5.4.229) + +See upstream commit : + + commit ecb9d0d2e123874bcdd2efdecda0f4e0c3dc566d + Author: Bixuan Cui + Date: Tue Oct 11 19:33:44 2022 +0800 + + jbd2: use the correct print format + + [ Upstream commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 ] + + The print format error was found when using ftrace event: + <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368 + <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0 + + Use the correct print format for transaction, head and tid. + +Change-Id: Ieee3d39ed1f2515e096e87d18b5ea8f921c54bd0 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +(cherry picked from commit 612c99eb24bf72f4d47d02025e92de8c35ece14e) +Signed-off-by: Roxana Nicolescu + +Origin: upstream, https://git.lttng.org/?p=lttng-modules.git;a=commit;h=612c99eb24bf72f4d47d02025e92de8c35ece14e +--- + instrumentation/events/lttng-module/jbd2.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h +index d44256b9..efcbced6 100644 +--- a/instrumentation/events/lttng-module/jbd2.h ++++ b/instrumentation/events/lttng-module/jbd2.h +@@ -29,6 +29,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \ + || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ +@@ -98,6 +99,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, + #endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \ + || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ +@@ -141,6 +143,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) \ ++ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \ + || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ + || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ + || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ +-- +2.34.1 + diff -Nru lttng-modules-2.10.8/debian/patches/series lttng-modules-2.10.8/debian/patches/series --- lttng-modules-2.10.8/debian/patches/series 2022-09-08 10:14:15.000000000 +0200 +++ lttng-modules-2.10.8/debian/patches/series 2023-02-10 08:56:19.000000000 +0100 @@ -21,3 +21,7 @@ compat-5.6/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch compat-5.6/0005-Update-Use-vmalloc_sync_mappings-for-ubuntu.patch compat-5.9/0001-fix-writeback-queue-io.patch +0016-fix-jbd2-use-the-correct-print-format.patch +0017-fix-jbd2-use-the-correct-print-format-v5.10.163.patch +0018-fix-jbd2-upper-bound-for-v5.10.163.patch +0019-fix-jbd2-use-the-correct-print-format-v5.4.229.patch