|
|
f5d2bd |
From 1eafb1f5aa0d3a9f60f89aad0ea55ae93899baff Mon Sep 17 00:00:00 2001
|
|
|
baabe4 |
From: Jerome Marchand <jmarchan@redhat.com>
|
|
|
baabe4 |
Date: Wed, 23 Feb 2022 16:04:30 +0100
|
|
|
f5d2bd |
Subject: [PATCH 3/3] tools: include blk-mq.h in bio tools
|
|
|
baabe4 |
|
|
|
baabe4 |
Kernel commit 24b83deb29b ("block: move struct request to blk-mq.h")
|
|
|
baabe4 |
has moved struct request from blkdev.h to blk-mq.h. It results in
|
|
|
baabe4 |
several bio tools to fail with errors of the following type:
|
|
|
baabe4 |
|
|
|
baabe4 |
error: incomplete definition of type 'struct request'
|
|
|
baabe4 |
|
|
|
baabe4 |
Since blk-mq.h had always included blkdev.h. it is safe to simply
|
|
|
baabe4 |
replace the inclusion of blkdev.h by blk-mq-h. It works on both older
|
|
|
baabe4 |
and newer kernel.
|
|
|
baabe4 |
|
|
|
baabe4 |
Fixes: #3869
|
|
|
baabe4 |
|
|
|
baabe4 |
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
|
|
|
baabe4 |
---
|
|
|
baabe4 |
tools/biolatency.py | 2 +-
|
|
|
baabe4 |
tools/biosnoop.py | 2 +-
|
|
|
baabe4 |
tools/biotop.py | 2 +-
|
|
|
baabe4 |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
baabe4 |
|
|
|
baabe4 |
diff --git a/tools/biolatency.py b/tools/biolatency.py
|
|
|
baabe4 |
index f4e2c9ea..427cee47 100755
|
|
|
baabe4 |
--- a/tools/biolatency.py
|
|
|
baabe4 |
+++ b/tools/biolatency.py
|
|
|
baabe4 |
@@ -64,7 +64,7 @@ debug = 0
|
|
|
baabe4 |
# define BPF program
|
|
|
baabe4 |
bpf_text = """
|
|
|
baabe4 |
#include <uapi/linux/ptrace.h>
|
|
|
baabe4 |
-#include <linux/blkdev.h>
|
|
|
baabe4 |
+#include <linux/blk-mq.h>
|
|
|
baabe4 |
|
|
|
baabe4 |
typedef struct disk_key {
|
|
|
baabe4 |
char disk[DISK_NAME_LEN];
|
|
|
baabe4 |
diff --git a/tools/biosnoop.py b/tools/biosnoop.py
|
|
|
baabe4 |
index 2b954ac9..ae38e384 100755
|
|
|
baabe4 |
--- a/tools/biosnoop.py
|
|
|
baabe4 |
+++ b/tools/biosnoop.py
|
|
|
baabe4 |
@@ -37,7 +37,7 @@ debug = 0
|
|
|
baabe4 |
# define BPF program
|
|
|
baabe4 |
bpf_text="""
|
|
|
baabe4 |
#include <uapi/linux/ptrace.h>
|
|
|
baabe4 |
-#include <linux/blkdev.h>
|
|
|
baabe4 |
+#include <linux/blk-mq.h>
|
|
|
baabe4 |
|
|
|
baabe4 |
// for saving the timestamp and __data_len of each request
|
|
|
baabe4 |
struct start_req_t {
|
|
|
baabe4 |
diff --git a/tools/biotop.py b/tools/biotop.py
|
|
|
baabe4 |
index eac4dab9..b3e3ea00 100755
|
|
|
baabe4 |
--- a/tools/biotop.py
|
|
|
baabe4 |
+++ b/tools/biotop.py
|
|
|
baabe4 |
@@ -54,7 +54,7 @@ diskstats = "/proc/diskstats"
|
|
|
baabe4 |
# load BPF program
|
|
|
baabe4 |
bpf_text = """
|
|
|
baabe4 |
#include <uapi/linux/ptrace.h>
|
|
|
baabe4 |
-#include <linux/blkdev.h>
|
|
|
baabe4 |
+#include <linux/blk-mq.h>
|
|
|
baabe4 |
|
|
|
baabe4 |
// for saving the timestamp and __data_len of each request
|
|
|
baabe4 |
struct start_req_t {
|
|
|
baabe4 |
--
|
|
|
baabe4 |
2.35.1
|
|
|
baabe4 |
|