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
This commit is contained in:
Jerome Marchand 2021-10-15 14:58:07 +02:00
parent f5e279f0a2
commit 4cf4db1b7f
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,26 @@
From 7453a97005fda29f0b7be8f257736a19d7c13dbe Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
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

View File

@ -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 <jmarchan@redhat.com> - 0.12.1-3
- Fix mdflush (rhbz#1967567)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.12.1-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688