Thread (28 messages) 28 messages, 2 authors, 2025-10-01
STALE274d
Revisions (6)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v3 [diff vs current]
  5. v4 [diff vs current]
  6. v4 [diff vs current]

[PATCH blktrace v2 03/22] blktrace: add definitions for BLKTRACESETUP2

From: Johannes Thumshirn <hidden>
Date: 2025-09-25 15:04:47
Also in: linux-block, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

Add definitions for a new BLKTRACESETUP2 ioctl(2).

This new ioctl(2) will request a new, updated structure layout from the
kernel which enhances the storage size of the 'action' field in order to
store additional tracepoints.

Signed-off-by: Johannes Thumshirn <redacted>
---
 blktrace_api.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/blktrace_api.h b/blktrace_api.h
index 172b4c2..9f435a5 100644
--- a/blktrace_api.h
+++ b/blktrace_api.h
@@ -139,9 +139,24 @@ struct blk_user_trace_setup {
 	__u32 pid;
 };
 
+/*
+ * User setup structure passed with BLKTRACESETUP2
+ */
+struct blk_user_trace_setup2 {
+	char name[32];			/* output */
+	__u64 act_mask;			/* input */
+	__u32 buf_size;			/* input */
+	__u32 buf_nr;			/* input */
+	__u64 start_lba;
+	__u64 end_lba;
+	__u32 pid;
+	__u32 reserved;			/* for futute use */
+};
+
 #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
 #define BLKTRACESTART _IO(0x12,116)
 #define BLKTRACESTOP _IO(0x12,117)
 #define BLKTRACETEARDOWN _IO(0x12,118)
+#define BLKTRACESETUP2 _IOWR(0x12, 142, struct blk_user_trace_setup2)
 
 #endif
-- 
2.51.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help