Thread (43 messages) 43 messages, 3 authors, 2025-10-10

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

From: Johannes Thumshirn <hidden>
Date: 2025-10-08 13:29:35
Also in: linux-block, lkml

On 10/1/25 9:30 AM, Damien Le Moal wrote:
On 9/26/25 00:02, Johannes Thumshirn wrote:
quoted
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 <redacted>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

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;

}



Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help