Re: [PATCH 1/5] blktrace: add zoned block commands to blk_fill_rwbs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.07.25 06:16, Damien Le Moal wrote:
> On 7/9/25 8:47 PM, Johannes Thumshirn wrote:
>> Add zoned block commands to blk_fill_rwbs:
>>
>> - ZONE APPEND will be decoded as 'ZA'
>> - ZONE RESET and ZONE RESET ALL will be decoded as 'ZR'
>> - ZONE FINISH will be decoded as 'ZF'
>> - ZONE OPEN will be decoded as 'ZO'
>> - ZONE CLOSE will be decoded as 'ZC'
>>
>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
>> ---
>>   kernel/trace/blktrace.c | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
>> index 3f6a7bdc6edf..f1dc00c22e37 100644
>> --- a/kernel/trace/blktrace.c
>> +++ b/kernel/trace/blktrace.c
>> @@ -1875,6 +1875,27 @@ void blk_fill_rwbs(char *rwbs, blk_opf_t opf)
>>   	case REQ_OP_READ:
>>   		rwbs[i++] = 'R';
>>   		break;
> 
> May be enclode this new hunk under a #ifdef CONFIG_BLK_DEV_ZONED ?

I'd prefer not to a) I dislike #ifdef in .c files and b) in other cases 
(i.e. submit_bio_noacct() we don't ifdef as either.

Of cause none of this is a no-go, so it's all personal preference and 
I'll do whatever Jens wants here.

>> +	case REQ_OP_ZONE_APPEND:
>> +		rwbs[i++] = 'Z';
>> +		rwbs[i++] = 'A';
>> +		break;
>> +	case REQ_OP_ZONE_RESET:
>> +	case REQ_OP_ZONE_RESET_ALL:
>> +		rwbs[i++] = 'Z';
>> +		rwbs[i++] = 'R';
> 
> I would really prefer the ability to distinguish single zone reset and all
> zones reset... Are we limited to 2 chars for the operation name ? If not,
> making REQ_OP_ZONE_RESET_ALL be "ZRA" would be better I think. If you want to
> preserve the 2 chars for the op name, then maybe ... no goo idea... Naming is
> hard :)

Again, I'd prefer the 2 chars version, as a RESET ALL can be 
distinguished form a plain RESET by the number of sectors (see patch 
4/5) and we would need to bump RWBS_LEN.

But of cause this as well is personal preference and I can go either 
way. Whatever is preferred by everyone.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux