diff options
| author | Naohiro Aota <naohiro.aota@wdc.com> | 2022-08-22 09:07:01 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-31 18:16:34 +0300 |
| commit | 1815305d81996c8f892669321ae23ab2ba3e0c4b (patch) | |
| tree | e65d3cb7f47d8f2dda309d69e9a78b6918f3d3c5 /include/linux | |
| parent | dd2ee2fd1fcbc104f8ee3871598442dc2760beab (diff) | |
| download | linux-1815305d81996c8f892669321ae23ab2ba3e0c4b.tar.xz | |
block: add bdev_max_segments() helper
commit 65ea1b66482f415d51cd46515b02477257330339 upstream
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -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 2f4ba6e345d5..67344dfe07a7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1393,6 +1393,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; |
