OSDN Git Service

block: do not reassig ->bi_bdev when partition remapping
authorChristoph Hellwig <hch@lst.de>
Sun, 24 Jan 2021 10:02:36 +0000 (11:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:17:20 +0000 (18:17 -0700)
commit30c5d3456c272f0de0d7e7eb9fc355fa64a5f649
tree8901f97019c05ddd88c2efa9994c7943519107d1
parent2f9f6221b9b9944e96c80455b469a6f0269c558b
block: do not reassig ->bi_bdev when partition remapping

There is no good reason to reassign ->bi_bdev when remapping the
partition-relative block number to the device wide one, as all the
information required by the drivers comes from the gendisk anyway.

Keeping the original ->bi_bdev alive will allow to greatly simplify
the partition-away I/O accounting.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
include/linux/bio.h
include/linux/blk_types.h