summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-24 09:34:24 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-01 14:53:40 -0700
commit29ff57c61094e7bbd921ab10b5a99dce9a0132e0 (patch)
tree76d8351cff0fdd01e9261fd0e4374e464d2899ca /block/blk-core.c
parent15e3d2c5cd53298272e59ad9072d3468f9dd3781 (diff)
block: move the start_sect field to struct block_device
Move the start_sect field to struct block_device in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index d2c9cb24e087..9a3793d5ce38 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -757,9 +757,10 @@ static inline int blk_partition_remap(struct bio *bio)
if (bio_sectors(bio)) {
if (bio_check_eod(bio, bdev_nr_sectors(p->bdev)))
goto out;
- bio->bi_iter.bi_sector += p->start_sect;
+ bio->bi_iter.bi_sector += p->bdev->bd_start_sect;
trace_block_bio_remap(bio->bi_disk->queue, bio, part_devt(p),
- bio->bi_iter.bi_sector - p->start_sect);
+ bio->bi_iter.bi_sector -
+ p->bdev->bd_start_sect);
}
bio->bi_partno = 0;
ret = 0;