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>
This commit is contained in:
Christoph Hellwig
2020-11-24 09:34:24 +01:00
committed by Jens Axboe
parent 15e3d2c5cd
commit 29ff57c610
8 changed files with 22 additions and 25 deletions

View File

@@ -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;