提交 eb6f7f7c 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

block: remove the request_queue argument to the block_split tracepoint

The request_queue can trivially be derived from the bio.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDamien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Acked-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 e8a676d6
...@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs) ...@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
split->bi_opf |= REQ_NOMERGE; split->bi_opf |= REQ_NOMERGE;
bio_chain(split, *bio); bio_chain(split, *bio);
trace_block_split(q, split, (*bio)->bi_iter.bi_sector); trace_block_split(split, (*bio)->bi_iter.bi_sector);
submit_bio_noacct(*bio); submit_bio_noacct(*bio);
*bio = split; *bio = split;
} }
......
...@@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, ...@@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
part_stat_unlock(); part_stat_unlock();
bio_chain(b, bio); bio_chain(b, bio);
trace_block_split(md->queue, b, bio->bi_iter.bi_sector); trace_block_split(b, bio->bi_iter.bi_sector);
ret = submit_bio_noacct(bio); ret = submit_bio_noacct(bio);
break; break;
} }
......
...@@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug, ...@@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug,
/** /**
* block_split - split a single bio struct into two bio structs * block_split - split a single bio struct into two bio structs
* @q: queue containing the bio
* @bio: block operation being split * @bio: block operation being split
* @new_sector: The starting sector for the new bio * @new_sector: The starting sector for the new bio
* *
* The bio request @bio in request queue @q needs to be split into two * The bio request @bio needs to be split into two bio requests. The newly
* bio requests. The newly created @bio request starts at * created @bio request starts at @new_sector. This split may be required due to
* @new_sector. This split may be required due to hardware limitation * hardware limitations such as operation crossing device boundaries in a RAID
* such as operation crossing device boundaries in a RAID system. * system.
*/ */
TRACE_EVENT(block_split, TRACE_EVENT(block_split,
TP_PROTO(struct request_queue *q, struct bio *bio, TP_PROTO(struct bio *bio, unsigned int new_sector),
unsigned int new_sector),
TP_ARGS(q, bio, new_sector), TP_ARGS(bio, new_sector),
TP_STRUCT__entry( TP_STRUCT__entry(
__field( dev_t, dev ) __field( dev_t, dev )
......
...@@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q, ...@@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
rcu_read_unlock(); rcu_read_unlock();
} }
static void blk_add_trace_split(void *ignore, static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
struct request_queue *q, struct bio *bio,
unsigned int pdu)
{ {
struct request_queue *q = bio->bi_disk->queue;
struct blk_trace *bt; struct blk_trace *bt;
rcu_read_lock(); rcu_read_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册