Re: [PATCH blktrace v2 04/22] blktrace: change size of action to 64 bits

Damien Le Moal <[email protected]> Wed, 1 Oct 2025 16:51:15 +0900
Newsgroups org.kernel.vger.linux-btrace,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-trace-kernel
Organization Western Digital Research
Message-ID <[email protected]>
On 9/26/25 00:04, Johannes Thumshirn wrote:
> In order to add the zoned commands to blktrace's actions, the storage size
> needs to be increased to 64bits.
> 
> Signed-off-by: Johannes Thumshirn <[email protected]>

Reviewed-by: Damien Le Moal <[email protected]>

One nit below.

> @@ -52,13 +53,13 @@ int add_format_spec(char *option)
>  
>  static inline void fill_rwbs(char *rwbs, struct blk_io_trace *t)
>  {
> -	int w = t->action & BLK_TC_ACT(BLK_TC_WRITE);
> -	int a = t->action & BLK_TC_ACT(BLK_TC_AHEAD);
> -	int s = t->action & BLK_TC_ACT(BLK_TC_SYNC);
> -	int m = t->action & BLK_TC_ACT(BLK_TC_META);
> -	int d = t->action & BLK_TC_ACT(BLK_TC_DISCARD);
> -	int f = t->action & BLK_TC_ACT(BLK_TC_FLUSH);
> -	int u = t->action & BLK_TC_ACT(BLK_TC_FUA);
> +	bool w = !!(t->action & BLK_TC_ACT(BLK_TC_WRITE));
> +	bool a = !!(t->action & BLK_TC_ACT(BLK_TC_AHEAD));
> +	bool s = !!(t->action & BLK_TC_ACT(BLK_TC_SYNC));
> +	bool m = !!(t->action & BLK_TC_ACT(BLK_TC_META));
> +	bool d = !!(t->action & BLK_TC_ACT(BLK_TC_DISCARD));
> +	bool f = !!(t->action & BLK_TC_ACT(BLK_TC_FLUSH));
> +	bool u = !!(t->action & BLK_TC_ACT(BLK_TC_FUA));
>  	int i = 0;

It looks like this should be a different patch. Also, I do not think that the
!!() is needed.


-- 
Damien Le Moal
Western Digital Research