diff options
author | Christoph Hellwig <hch@lst.de> | 2020-08-31 20:02:34 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-01 16:49:26 -0600 |
commit | 7cf34d97ab45203b975396393ded9d3867dfa8bf (patch) | |
tree | 67f8c18b472ef61230e37cd14c200fc3e2a9396e /include/linux/blkdev.h | |
parent | 7b8917f5e29c377be1db5680249fe30e038cb3eb (diff) | |
download | lwn-7cf34d97ab45203b975396393ded9d3867dfa8bf.tar.gz lwn-7cf34d97ab45203b975396393ded9d3867dfa8bf.zip |
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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ba1f5f5e11c6..d0d61bc81615 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -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; } |