lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.19 1084/1157] block: add bdev_max_segments() helper
    Date
    From: Naohiro Aota <naohiro.aota@wdc.com>

    [ 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>
    ---
    include/linux/blkdev.h | 5 +++++
    1 file changed, 5 insertions(+)

    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;
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-08-16 03:06    [W:2.935 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site