summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2022-07-09 08:18:38 +0900
committerDavid Sterba <dsterba@suse.com>2022-07-25 17:45:41 +0200
commit65ea1b66482f415d51cd46515b02477257330339 (patch)
tree1d702acd052fc95d5c9045fcf3c3fb17bb3b58fd /include/linux/blkdev.h
parentcf2404a976268f2b1b3448724c43060acb224034 (diff)
downloadlinux-65ea1b66482f415d51cd46515b02477257330339.tar.gz
linux-65ea1b66482f415d51cd46515b02477257330339.tar.bz2
linux-65ea1b66482f415d51cd46515b02477257330339.zip
block: add bdev_max_segments() helper
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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2f7b43444c5f..62e3ff52ab03 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1206,6 +1206,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;