diff options
| author | Naohiro Aota <naohiro.aota@wdc.com> | 2022-07-09 08:18:38 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-17 14:42:25 +0200 |
| commit | 3bbb769908a67c955a94e1da57121f96d6809251 (patch) | |
| tree | 43f62589ab094f7465a0f16b202d25d9fac28f52 | |
| parent | 5f4e505909fe50a4e256704076594ee3def0b9b1 (diff) | |
block: add bdev_max_segments() helper
[ Upstream commit 65ea1b66482f415d51cd46515b02477257330339 ]
Add bdev_max_segments() like other queue parameters.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | include/linux/blkdev.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 34f2b88dfd6e..7927480b9cf7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1196,6 +1196,11 @@ bdev_max_zone_append_sectors(struct block_device *bdev) return queue_max_zone_append_sectors(bdev_get_queue(bdev)); } +static inline unsigned int bdev_max_segments(struct block_device *bdev) +{ + return queue_max_segments(bdev_get_queue(bdev)); +} + static inline unsigned queue_logical_block_size(const struct request_queue *q) { int retval = 512; |
