Re: [PATCH v2 13/15] blktrace: trace zone management operations
From: Johannes Thumshirn
Date: Wed Oct 08 2025 - 09:29:56 EST
On 10/1/25 9:30 AM, Damien Le Moal wrote:
> On 9/26/25 00:02, Johannes Thumshirn wrote:
>> Trace zone management operations on block devices.
>>
>> As tracing of zoned block commands needs the upper 32bit of the widened
>> 64bit action, only add traces to blktrace if user-space has requested
>> version 2 of the blktrace protocol.
>>
>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
> Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
>
> Note: Are the zone management command completion traced ? I do not see a patch
> for that...
>
>
I finally had a chance to look into zone management command tracing
again, but the problem here is we're having this pattern:
int blkdev_zone_mgmt(struct block_device *bdev, enum req_op op,
sector_t sector, sector_t nr_sectors)
{
/* [...] */
trace_blkdev_zone_mgmt(bio, nr_sectors);
ret = submit_bio_wait(bio);
bio_put(bio);
return ret;
}
I'm not sure if it makes sense to do completion tracing here. At least
we cannot do it in the endio handler as usual.
One thing to get the error and the duration would be the following:
int blkdev_zone_mgmt(struct block_device *bdev, enum req_op op,
sector_t sector, sector_t nr_sectors)
{
/* [...] */
trace_blkdev_zone_mgmt(bio, nr_sectors);
ret = submit_bio_wait(bio);
+ trace_blkdev_zone_mgmt_completion(bio, nr_sectors, bio->bi_error);
bio_put(bio);
return ret;
}