aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-07-27 12:22:57 -0400
committerJens Axboe <axboe@kernel.dk>2022-08-02 21:08:49 -0600
commit46754bd056053785d7079f1d48f7f571728dcb47 (patch)
tree19ace24d9b5561c42c727d066d971940b96a0854 /block/blk-merge.c
parentblock: change the blk_queue_bounce calling convention (diff)
downloadwireguard-linux-46754bd056053785d7079f1d48f7f571728dcb47.tar.xz
wireguard-linux-46754bd056053785d7079f1d48f7f571728dcb47.zip
block: move ->bio_split to the gendisk
Only non-passthrough requests are split by the block layer and use the ->bio_split bio_set. Move it from the request_queue to the gendisk. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20220727162300.3089193-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 6e29fb28584e..30872a353764 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -331,18 +331,19 @@ split:
struct bio *__bio_split_to_limits(struct bio *bio, struct request_queue *q,
unsigned int *nr_segs)
{
+ struct bio_set *bs = &bio->bi_bdev->bd_disk->bio_split;
struct bio *split;
switch (bio_op(bio)) {
case REQ_OP_DISCARD:
case REQ_OP_SECURE_ERASE:
- split = bio_split_discard(bio, q, nr_segs, &q->bio_split);
+ split = bio_split_discard(bio, q, nr_segs, bs);
break;
case REQ_OP_WRITE_ZEROES:
- split = bio_split_write_zeroes(bio, q, nr_segs, &q->bio_split);
+ split = bio_split_write_zeroes(bio, q, nr_segs, bs);
break;
default:
- split = bio_split_rw(bio, q, nr_segs, &q->bio_split);
+ split = bio_split_rw(bio, q, nr_segs, bs);
break;
}