block: call trace_block_split() from bio_split()
Subsystems (2)
PATCH 1/1 block: call trace_block_split() from bio_split()
Somewhere around
Commit: 20d0189b1012 ("block: Introduce new bio_split()") and
Commit: 4b1faf931650 ("block: Kill bio_pair_split()")
in 3.14 we lost the call to trace_block_split() from bio_split().
Commit: cda22646adaa ("block: add call to split trace point")
in 4.5 added it back for blk_queue_split(), but not for other users of bio_split(), and particularly not for md/raid.
This patch moves the trace_block_split() call from blk_queue_split() to bio_split().
As blk_queue_split() calls bio_split() (via various helper functions) the same events that were traced before will still be traced.
--- block/bio.c | 1 + block/blk-merge.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
block/bio.c +1 -0
@@ -1804,6 +1804,7 @@ struct bio *bio_split(struct bio *bio, int sectors,bio_integrity_trim (split,0 , sectors);bio_advance (bio, split->bi_iter.bi_size); +trace_block_split (bdev_get_queue (bio->bi_bdev), split, bio->bi_iter.bi_sector);return split; }
block/blk-merge.c +0 -1
@@ -217,7 +217,6 @@ void blk_queue_split(struct request_queue *q, struct bio **bio, split->bi_opf |=REQ_NOMERGE ;bio_chain (split, *bio); -trace_block_split (q, split, (*bio)->bi_iter.bi_sector);generic_make_request (*bio); *bio = split; }
Signature · 1 line
2.10.2
Quoted 30 lines · NeilBrown
Somewhere around
Commit:20d0189b1012("block: Introduce newbio_split()") and
Commit:4b1faf931650("block: Killbio_pair_split()")in 3.14 we lost the call to
trace_block_split()frombio_split().Commit:
cda22646adaa("block: add call to split trace point")in 4.5 added it back for
blk_queue_split(), but not for other users ofbio_split(), and particularly not for md/raid.This patch moves the
trace_block_split()call fromblk_queue_split()tobio_split().
Asblk_queue_split()callsbio_split()(via various helper functions) the same events that were traced before will still be traced.Signed-off-by NeilBrown <[email protected]>--- block/bio.c | 1 + block/blk-merge.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)block/bio.c +0
-0
block/bio.c struct bio *bio_split(struct bio *bio, int sectors, · line 1807
Quoted 4 lines
block/bio.c +1
-0@@ -1804,6 +1804,7 @@ struct bio *bio_split(struct bio *bio, int sectors,bio_integrity_trim (split,0 , sectors);bio_advance (bio, split->bi_iter.bi_size); +trace_block_split (bdev_get_queue (bio->bi_bdev), split, bio->bi_iter.bi_sector);
This line needs to be wrapped.
Otherwise looks fine:
PATCH v2 1/1 block: call trace_block_split() from bio_split()
Somewhere around
Commit: 20d0189b1012 ("block: Introduce new bio_split()") and
Commit: 4b1faf931650 ("block: Kill bio_pair_split()")
in 3.14 we lost the call to trace_block_split() from bio_split().
Commit: cda22646adaa ("block: add call to split trace point")
in 4.5 added it back for blk_queue_split(), but not for other users of bio_split(), and particularly not for md.
This patch moves the trace_block_split() call from blk_queue_split() to bio_split().
As blk_queue_split() calls bio_split() (via various helper functions) the same events that were traced before will still be traced.
---
Thanks Christoph.
This adds the wrap and the reviewed-by.
NeilBrown
block/bio.c | 2 ++ block/blk-merge.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
block/bio.c +2 -0
@@ -1804,6 +1804,8 @@ struct bio *bio_split(struct bio *bio, int sectors,bio_integrity_trim (split,0 , sectors);bio_advance (bio, split->bi_iter.bi_size); +trace_block_split (bdev_get_queue (bio->bi_bdev), split, + bio->bi_iter.bi_sector);return split; }
block/blk-merge.c +0 -1
@@ -217,7 +217,6 @@ void blk_queue_split(struct request_queue *q, struct bio **bio, split->bi_opf |=REQ_NOMERGE ;bio_chain (split, *bio); -trace_block_split (q, split, (*bio)->bi_iter.bi_sector);generic_make_request (*bio); *bio = split; }
Signature · 1 line
2.10.2