From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: dm-devel@redhat.com, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Date: Mon, 30 Nov 2020 18:58:52 +0100 [thread overview] Message-ID: <20201130175854.982460-4-hch@lst.de> (raw) In-Reply-To: <20201130175854.982460-1-hch@lst.de> The request_queue can trivially be derived from the bio. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-merge.c | 2 +- drivers/md/dm.c | 2 +- include/trace/events/block.h | 14 ++++++-------- kernel/trace/blktrace.c | 5 ++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 1a46d5bbd399e3..4071daa88a5eaf 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs) split->bi_opf |= REQ_NOMERGE; 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); *bio = split; } diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ed7e836efbcdbc..9a5bd90779c7c4 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, part_stat_unlock(); 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); break; } diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 506c29dc7c76fd..b415e4cba84304 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug, /** * block_split - split a single bio struct into two bio structs - * @q: queue containing the bio * @bio: block operation being split * @new_sector: The starting sector for the new bio * - * The bio request @bio in request queue @q needs to be split into two - * bio requests. The newly created @bio request starts at - * @new_sector. This split may be required due to hardware limitation - * such as operation crossing device boundaries in a RAID system. + * The bio request @bio needs to be split into two bio requests. The newly + * created @bio request starts at @new_sector. This split may be required due to + * hardware limitations such as operation crossing device boundaries in a RAID + * system. */ TRACE_EVENT(block_split, - TP_PROTO(struct request_queue *q, struct bio *bio, - unsigned int new_sector), + TP_PROTO(struct bio *bio, unsigned int new_sector), - TP_ARGS(q, bio, new_sector), + TP_ARGS(bio, new_sector), TP_STRUCT__entry( __field( dev_t, dev ) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7ab88e00c15765..3ca6d62114f461 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q, rcu_read_unlock(); } -static void blk_add_trace_split(void *ignore, - struct request_queue *q, struct bio *bio, - unsigned int pdu) +static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu) { + struct request_queue *q = bio->bi_disk->queue; struct blk_trace *bt; rcu_read_lock(); -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org, linux-raid@vger.kernel.org, dm-devel@redhat.com, linux-s390@vger.kernel.org Subject: [dm-devel] [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Date: Mon, 30 Nov 2020 18:58:52 +0100 [thread overview] Message-ID: <20201130175854.982460-4-hch@lst.de> (raw) In-Reply-To: <20201130175854.982460-1-hch@lst.de> The request_queue can trivially be derived from the bio. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-merge.c | 2 +- drivers/md/dm.c | 2 +- include/trace/events/block.h | 14 ++++++-------- kernel/trace/blktrace.c | 5 ++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 1a46d5bbd399e3..4071daa88a5eaf 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs) split->bi_opf |= REQ_NOMERGE; 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); *bio = split; } diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ed7e836efbcdbc..9a5bd90779c7c4 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, part_stat_unlock(); 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); break; } diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 506c29dc7c76fd..b415e4cba84304 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug, /** * block_split - split a single bio struct into two bio structs - * @q: queue containing the bio * @bio: block operation being split * @new_sector: The starting sector for the new bio * - * The bio request @bio in request queue @q needs to be split into two - * bio requests. The newly created @bio request starts at - * @new_sector. This split may be required due to hardware limitation - * such as operation crossing device boundaries in a RAID system. + * The bio request @bio needs to be split into two bio requests. The newly + * created @bio request starts at @new_sector. This split may be required due to + * hardware limitations such as operation crossing device boundaries in a RAID + * system. */ TRACE_EVENT(block_split, - TP_PROTO(struct request_queue *q, struct bio *bio, - unsigned int new_sector), + TP_PROTO(struct bio *bio, unsigned int new_sector), - TP_ARGS(q, bio, new_sector), + TP_ARGS(bio, new_sector), TP_STRUCT__entry( __field( dev_t, dev ) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7ab88e00c15765..3ca6d62114f461 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q, rcu_read_unlock(); } -static void blk_add_trace_split(void *ignore, - struct request_queue *q, struct bio *bio, - unsigned int pdu) +static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu) { + struct request_queue *q = bio->bi_disk->queue; struct blk_trace *bt; rcu_read_lock(); -- 2.29.2 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2020-11-30 18:07 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-30 17:58 block tracepoint cleanups Christoph Hellwig 2020-11-30 17:58 ` [dm-devel] " Christoph Hellwig 2020-11-30 17:58 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig 2020-11-30 17:58 ` [dm-devel] " Christoph Hellwig 2020-12-03 8:46 ` Damien Le Moal 2020-12-03 8:46 ` Damien Le Moal 2020-12-03 12:43 ` Hannes Reinecke 2020-12-03 12:43 ` [dm-devel] " Hannes Reinecke 2020-11-30 17:58 ` [PATCH 2/5] block: simplify and extended the block_bio_merge tracepoint class Christoph Hellwig 2020-11-30 17:58 ` [dm-devel] " Christoph Hellwig 2020-12-03 8:56 ` Damien Le Moal 2020-12-03 8:56 ` Damien Le Moal 2020-12-03 12:46 ` Hannes Reinecke 2020-12-03 12:46 ` [dm-devel] " Hannes Reinecke 2020-11-30 17:58 ` Christoph Hellwig [this message] 2020-11-30 17:58 ` [dm-devel] [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig 2020-12-03 8:59 ` Damien Le Moal 2020-12-03 8:59 ` [dm-devel] " Damien Le Moal 2020-12-03 12:47 ` Hannes Reinecke 2020-12-03 12:47 ` [dm-devel] " Hannes Reinecke 2020-11-30 17:58 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig 2020-11-30 17:58 ` [dm-devel] " Christoph Hellwig 2020-12-03 9:02 ` Damien Le Moal 2020-12-03 9:02 ` Damien Le Moal 2020-12-03 12:49 ` Hannes Reinecke 2020-12-03 12:49 ` [dm-devel] " Hannes Reinecke 2020-11-30 17:58 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig 2020-11-30 17:58 ` [dm-devel] " Christoph Hellwig 2020-12-03 9:06 ` Damien Le Moal 2020-12-03 9:06 ` Damien Le Moal 2020-12-03 12:49 ` Hannes Reinecke 2020-12-03 12:49 ` [dm-devel] " Hannes Reinecke 2020-12-03 8:25 ` block tracepoint cleanups Christoph Hellwig 2020-12-03 8:25 ` [dm-devel] " Christoph Hellwig 2020-12-03 15:38 ` Tejun Heo 2020-12-03 15:38 ` [dm-devel] " Tejun Heo 2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig 2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig 2020-12-03 20:06 ` Tejun Heo 2020-12-04 3:26 ` Chaitanya Kulkarni
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201130175854.982460-4-hch@lst.de \ --to=hch@lst.de \ --cc=axboe@kernel.dk \ --cc=dm-devel@redhat.com \ --cc=linux-block@vger.kernel.org \ --cc=linux-raid@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.