block: remove the discard_alignment 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>
This commit is contained in:
Christoph Hellwig
2020-08-31 20:02:34 +02:00
committed by Jens Axboe
parent 7b8917f5e2
commit 7cf34d97ab
3 changed files with 6 additions and 6 deletions

View File

@@ -1498,8 +1498,8 @@ static inline int bdev_discard_alignment(struct block_device *bdev)
struct request_queue *q = bdev_get_queue(bdev);
if (bdev != bdev->bd_contains)
return bdev->bd_part->discard_alignment;
return queue_limit_discard_alignment(&q->limits,
bdev->bd_part->start_sect);
return q->limits.discard_alignment;
}