Skip to content

Commit eb6f7f7

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove the request_queue argument to the block_split tracepoint
The request_queue can trivially be derived from the bio. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent e8a676d commit eb6f7f7

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

‎block/blk-merge.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
338338
split->bi_opf |= REQ_NOMERGE;
339339

340340
bio_chain(split, *bio);
341-
trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
341+
trace_block_split(split, (*bio)->bi_iter.bi_sector);
342342
submit_bio_noacct(*bio);
343343
*bio = split;
344344
}

‎drivers/md/dm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
16121612
part_stat_unlock();
16131613

16141614
bio_chain(b, bio);
1615-
trace_block_split(md->queue, b, bio->bi_iter.bi_sector);
1615+
trace_block_split(b, bio->bi_iter.bi_sector);
16161616
ret = submit_bio_noacct(bio);
16171617
break;
16181618
}

‎include/trace/events/block.h‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug,
411411

412412
/**
413413
* block_split - split a single bio struct into two bio structs
414-
* @q: queue containing the bio
415414
* @bio: block operation being split
416415
* @new_sector: The starting sector for the new bio
417416
*
418-
* The bio request @bio in request queue @q needs to be split into two
419-
* bio requests. The newly created @bio request starts at
420-
* @new_sector. This split may be required due to hardware limitation
421-
* such as operation crossing device boundaries in a RAID system.
417+
* The bio request @bio needs to be split into two bio requests. The newly
418+
* created @bio request starts at @new_sector. This split may be required due to
419+
* hardware limitations such as operation crossing device boundaries in a RAID
420+
* system.
422421
*/
423422
TRACE_EVENT(block_split,
424423

425-
TP_PROTO(struct request_queue *q, struct bio *bio,
426-
unsigned int new_sector),
424+
TP_PROTO(struct bio *bio, unsigned int new_sector),
427425

428-
TP_ARGS(q, bio, new_sector),
426+
TP_ARGS(bio, new_sector),
429427

430428
TP_STRUCT__entry(
431429
__field( dev_t, dev )

‎kernel/trace/blktrace.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
970970
rcu_read_unlock();
971971
}
972972

973-
static void blk_add_trace_split(void *ignore,
974-
struct request_queue *q, struct bio *bio,
975-
unsigned int pdu)
973+
static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
976974
{
975+
struct request_queue *q = bio->bi_disk->queue;
977976
struct blk_trace *bt;
978977

979978
rcu_read_lock();

0 commit comments

Comments
 (0)