[PATCH v4 20/20] blktrace: support protocol version 8
Johannes Thumshirn <[email protected]> Mon, 24 Nov 2025 23:52:06 -0800
| Newsgroups | org.kernel.vger.linux-btrace,org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
Also support protocol version 8 in conjunction with protocol version 7. Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> --- blktrace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blktrace.h b/blktrace.h index 0281088..ba06237 100644 --- a/blktrace.h +++ b/blktrace.h @@ -70,6 +70,7 @@ extern struct timespec abs_start_time; #define CHECK_MAGIC(magic) (((magic) & 0xffffff00) == BLK_IO_TRACE_MAGIC) #define SUPPORTED_VERSION (0x07) +#define SUPPORTED_VERSION2 (0x08) #if __BYTE_ORDER == __LITTLE_ENDIAN #define be16_to_cpu(x) __bswap_16(x) @@ -99,7 +100,8 @@ static inline int verify_trace(__u32 magic) } version = magic & 0xff; - if (version != SUPPORTED_VERSION) { + if (version != SUPPORTED_VERSION && + version != SUPPORTED_VERSION2) { fprintf(stderr, "unsupported trace version %x\n", version); return 1; } -- 2.51.1