Re: [PATCH blktrace v2 04/22] blktrace: change size of action to 64 bits
From: Damien Le Moal <dlemoal@kernel.org>
Date: 2025-10-01 07:51:24
Also in:
linux-block, lkml
From: Damien Le Moal <dlemoal@kernel.org>
Date: 2025-10-01 07:51:24
Also in:
linux-block, lkml
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 <redacted>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org> 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