Skip to content

Commit c788308

Browse files
morbidrsakawasaki
authored andcommitted
block: add tracepoint for blk_zone_update_request_bio
Add a tracepoint in blk_zone_update_request_bio() to trace the bio sector update on ZONE APPEND completions. An example for this tracepoint is as follows: <idle>-0 [001] d.h1. 381.746444: blk_zone_update_request_bio: 259,5 ZAS 131072 () 1048832 + 256 none,0,0 [swapper/1] Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: Damien Le Moal <[email protected]>
1 parent 9348fb2 commit c788308

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

block/blk-zoned.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/refcount.h>
1818
#include <linux/mempool.h>
1919

20+
#include <trace/events/block.h>
21+
2022
#include "blk.h"
2123
#include "blk-mq-sched.h"
2224
#include "blk-mq-debugfs.h"
@@ -1216,6 +1218,7 @@ void blk_zone_append_update_request_bio(struct request *rq, struct bio *bio)
12161218
* lookup the zone write plug.
12171219
*/
12181220
bio->bi_iter.bi_sector = rq->__sector;
1221+
trace_blk_zone_append_update_request_bio(rq);
12191222
}
12201223

12211224
void blk_zone_write_plug_bio_endio(struct bio *bio)

include/trace/events/block.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,17 @@ DEFINE_EVENT(block_bio, block_getrq,
404404
TP_ARGS(bio)
405405
);
406406

407+
/**
408+
* block_zone_update_request_bio - update the bio sector after a zone append
409+
* @bio: the completed block IO operation
410+
*
411+
* Update the bio's bi_sector after a zone append command has been completed.
412+
*/
413+
DEFINE_EVENT(block_rq, blk_zone_append_update_request_bio,
414+
TP_PROTO(struct request *rq),
415+
TP_ARGS(rq)
416+
);
417+
407418
/**
408419
* block_plug - keep operations requests in request queue
409420
* @q: request queue to plug

0 commit comments

Comments
 (0)