Blob Blame History Raw
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