All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Christoph Hellwig <hch@lst.de>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>,
	Niklas Cassel <cassel@kernel.org>,
	linux-btrace@vger.kernel.org
Subject: Re: [RESEND PATCH blktrace v3 06/20] blktrace: support protocol version 8
Date: Mon, 24 Nov 2025 18:00:31 +0900	[thread overview]
Message-ID: <62285a77-2bd2-4357-b2fa-443eea262f1b@kernel.org> (raw)
In-Reply-To: <20251124073739.513212-7-johannes.thumshirn@wdc.com>

On 2025/11/24 16:37, Johannes Thumshirn wrote:
> Also support protocol version 8 in conjunction with protocol version 7.

Shouldn't this go last in the series, after enabling the code that deal with
this new version ?

> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  blktrace.h | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/blktrace.h b/blktrace.h
> index 74dfb48..3305fa0 100644
> --- a/blktrace.h
> +++ b/blktrace.h
> @@ -69,6 +69,7 @@ extern struct timespec abs_start_time;
>  
>  #define CHECK_MAGIC(t)		(((t)->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)
> @@ -90,13 +91,17 @@ extern struct timespec abs_start_time;
>  
>  static inline int verify_trace(struct blk_io_trace *t)
>  {
> +	u8 version;
> +
>  	if (!CHECK_MAGIC(t)) {
>  		fprintf(stderr, "bad trace magic %x\n", t->magic);
>  		return 1;
>  	}
> -	if ((t->magic & 0xff) != SUPPORTED_VERSION) {
> -		fprintf(stderr, "unsupported trace version %x\n", 
> -			t->magic & 0xff);
> +
> +	version = t->magic & 0xff;
> +	if (version != SUPPORTED_VERSION &&
> +	    version != SUPPORTED_VERSION2) {
> +		fprintf(stderr, "unsupported trace version %x\n", version);
>  		return 1;
>  	}
>  


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2025-11-24  9:00 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24  7:37 [RESEND PATCH blktrace v3 00/20] blktrace: Add user-space support for zoned command tracing Johannes Thumshirn
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 01/20] blktrace: fix comment for struct blk_trace_setup: Johannes Thumshirn
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 02/20] blkparse: fix compiler warning Johannes Thumshirn
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 03/20] blktrace: add definitions for BLKTRACESETUP2 Johannes Thumshirn
2025-11-24  8:57   ` Damien Le Moal
2025-11-24  9:04     ` Johannes Thumshirn
2025-11-24  9:16   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 04/20] blktrace: change size of action to 64 bits Johannes Thumshirn
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 05/20] blktrace: add definitions for blk_io_trace2 Johannes Thumshirn
2025-11-24  9:15   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 06/20] blktrace: support protocol version 8 Johannes Thumshirn
2025-11-24  9:00   ` Damien Le Moal [this message]
2025-11-24  9:04     ` Johannes Thumshirn
2025-11-24  9:16       ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 07/20] blkparse: pass magic to get_magic Johannes Thumshirn
2025-11-24  9:01   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 08/20] blkparse: read 'magic' first Johannes Thumshirn
2025-11-24  9:03   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 09/20] blkparse: factor out reading of a singe blk_io_trace event Johannes Thumshirn
2025-11-24  9:04   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 10/20] blkparse: skip unsupported protocol versions Johannes Thumshirn
2025-11-24  9:05   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 11/20] blkparse: make get_pdulen() take the pdu_len Johannes Thumshirn
2025-11-24  9:06   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 12/20] blkiomon: read 'magic' first Johannes Thumshirn
2025-11-24  9:06   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 13/20] blktrace: pass magic to CHECK_MAGIC macro Johannes Thumshirn
2025-11-24  9:07   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 14/20] blktrace: pass magic to verify_trace Johannes Thumshirn
2025-11-24  9:07   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 15/20] blktrace: rename trace_to_cpu to bit_trace_to_cpu Johannes Thumshirn
2025-11-24  9:08   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 16/20] blkparse: use blk_io_trace2 internally Johannes Thumshirn
2025-11-24  9:10   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 17/20] blkparse: natively parse blk_io_trace2 Johannes Thumshirn
2025-11-24  9:11   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 18/20] blkparse: parse zone (un)plug actions Johannes Thumshirn
2025-11-24  9:12   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 19/20] blkparse: add zoned commands to fill_rwbs() Johannes Thumshirn
2025-11-24  9:13   ` Damien Le Moal
2025-11-24  7:37 ` [RESEND PATCH blktrace v3 20/20] blktrace: call BLKTRACESETUP2 ioctl per default to setup a trace Johannes Thumshirn
2025-11-24  9:14   ` Damien Le Moal
2025-11-24 13:08 ` [RESEND PATCH blktrace v3 00/20] blktrace: Add user-space support for zoned command tracing Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62285a77-2bd2-4357-b2fa-443eea262f1b@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cassel@kernel.org \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrace@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=shinichiro.kawasaki@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.