From 4cf4db1b7f7d95d43968672c48e664a0083011e5 Mon Sep 17 00:00:00 2001 From: Jerome Marchand Date: Fri, 15 Oct 2021 14:58:07 +0200 Subject: [PATCH] Fix mdflush Since kernel commit 309dca309fc ("block: store a block_device pointer in struct bio") struct bio points again to a block_device and not to a gendisk directly. Resolves: rhbz#1967567 --- bpftrace-0.12.1-Fix-mdflush.patch | 26 ++++++++++++++++++++++++++ bpftrace.spec | 7 +++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 bpftrace-0.12.1-Fix-mdflush.patch diff --git a/bpftrace-0.12.1-Fix-mdflush.patch b/bpftrace-0.12.1-Fix-mdflush.patch new file mode 100644 index 0000000..c2baaa4 --- /dev/null +++ b/bpftrace-0.12.1-Fix-mdflush.patch @@ -0,0 +1,26 @@ +From 7453a97005fda29f0b7be8f257736a19d7c13dbe Mon Sep 17 00:00:00 2001 +From: Jerome Marchand +Date: Fri, 15 Oct 2021 14:26:28 +0200 +Subject: [PATCH] Fix mdflush + +Since kernel commit 309dca309fc ("block: store a block_device pointer +in struct bio") struct bio points again to a block_device and not to a +gendisk directly. +--- + tools/mdflush.bt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/mdflush.bt b/tools/mdflush.bt +index e767b81d..541abba1 100755 +--- a/tools/mdflush.bt ++++ b/tools/mdflush.bt +@@ -26,5 +26,5 @@ kprobe:md_flush_request + { + time("%H:%M:%S "); + printf("%-6d %-16s %s\n", pid, comm, +- ((struct bio *)arg1)->bi_disk->disk_name); ++ ((struct bio *)arg1)->bi_bdev->bd_disk->disk_name); + } +-- +2.31.1 + diff --git a/bpftrace.spec b/bpftrace.spec index 1df0fe9..50fbff4 100644 --- a/bpftrace.spec +++ b/bpftrace.spec @@ -1,12 +1,13 @@ Name: bpftrace Version: 0.12.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: High-level tracing language for Linux eBPF License: ASL 2.0 URL: https://github.com/iovisor/bpftrace Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-RHEL-9-fixes.patch +Patch1: %{name}-%{version}-Fix-mdflush.patch # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches @@ -74,8 +75,10 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \ %attr(0755,-,-) %{_datadir}/%{name}/tools/*.bt %{_datadir}/%{name}/tools/doc/*.txt - %changelog +* Fri Oct 15 2021 Jerome Marchand - 0.12.1-3 +- Fix mdflush (rhbz#1967567) + * Mon Aug 09 2021 Mohan Boddu - 0.12.1-2 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688