Re: [PATCH v2 13/15] blktrace: trace zone management operations

Damien Le Moal
2025-10-08T22:41:31Z

On 10/8/25 22:29, Johannes Thumshirn wrote:
> 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);

That does seem OK to me. Maybe try and see how it looks ?
Though the request alloc, insert, dispatch and completion for this BIO will
still be traced, right ? If these events show correctly that this is a zone
management command (and which one it is), then we should not need the above.

--
Damien Le Moal
Western Digital Research