diff options
author | Christoph Hellwig <hch@lst.de> | 2020-08-31 20:02:33 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-02 00:49:26 +0200 |
commit | 7b8917f5e29c377be1db5680249fe30e038cb3eb (patch) | |
tree | 08fe31667ad1977295a57dd95c29154ddc069f69 /include | |
parent | blk-mq: use BLK_MQ_NO_TAG for no tag (diff) | |
download | linux-7b8917f5e29c377be1db5680249fe30e038cb3eb.tar.xz linux-7b8917f5e29c377be1db5680249fe30e038cb3eb.zip |
block: remove the alignment_offset field from struct hd_struct
The alignment offset is only used in slow path callers, so just calculate
it on the fly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 5 | ||||
-rw-r--r-- | include/linux/genhd.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0a1730b30ad2..ba1f5f5e11c6 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1456,10 +1456,9 @@ static inline int bdev_alignment_offset(struct block_device *bdev) if (q->limits.misaligned) return -1; - if (bdev != bdev->bd_contains) - return bdev->bd_part->alignment_offset; - + return queue_limit_alignment_offset(&q->limits, + bdev->bd_part->start_sect); return q->limits.alignment_offset; } diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 39025dc0397c..bfa411c80dbb 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -65,7 +65,6 @@ struct hd_struct { struct disk_stats __percpu *dkstats; struct percpu_ref ref; - sector_t alignment_offset; unsigned int discard_alignment; struct device __dev; struct kobject *holder_dir; |