diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-24 13:02:34 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-25 04:17:20 +0300 |
commit | 309dca309fc39a9e3c31b916393b74bd174fd74e (patch) | |
tree | 2d4687a800a52cfd96482c7c01224236da796102 /include/linux/blk-mq.h | |
parent | cf9a978f9781fb30b778ee61ef6bd164c655d9ff (diff) | |
download | linux-309dca309fc39a9e3c31b916393b74bd174fd74e.tar.xz |
block: store a block_device pointer in struct bio
Replace the gendisk pointer in struct bio with a pointer to the newly
improved struct block device. From that the gendisk can be trivially
accessed with an extra indirection, but it also allows to directly
look up all information related to partition remapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-mq.h')
-rw-r--r-- | include/linux/blk-mq.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index d705b174d346..6b410dab48ee 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -602,8 +602,8 @@ static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio, rq->bio = rq->biotail = bio; rq->ioprio = bio_prio(bio); - if (bio->bi_disk) - rq->rq_disk = bio->bi_disk; + if (bio->bi_bdev) + rq->rq_disk = bio->bi_bdev->bd_disk; } blk_qc_t blk_mq_submit_bio(struct bio *bio); |