lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 0216/1039] null_blk: allow zero poll queues
    Date
    From: Ming Lei <ming.lei@redhat.com>

    [ Upstream commit 2bfdbe8b7ebd17b5331071071a910fbabc64b436 ]

    There isn't any reason to not allow zero poll queues from user
    viewpoint.

    Also sometimes we need to compare io poll between poll mode and irq
    mode, so not allowing poll queues is bad.

    Fixes: 15dfc662ef31 ("null_blk: Fix handling of submit_queues and poll_queues attributes")
    Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Signed-off-by: Ming Lei <ming.lei@redhat.com>
    Link: https://lore.kernel.org/r/20211203023935.3424042-1-ming.lei@redhat.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/block/null_blk/main.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
    index 323af5c9c8026..fc1317060db54 100644
    --- a/drivers/block/null_blk/main.c
    +++ b/drivers/block/null_blk/main.c
    @@ -340,9 +340,9 @@ static int nullb_update_nr_hw_queues(struct nullb_device *dev,
    return 0;

    /*
    - * Make sure at least one queue exists for each of submit and poll.
    + * Make sure at least one submit queue exists.
    */
    - if (!submit_queues || !poll_queues)
    + if (!submit_queues)
    return -EINVAL;

    /*
    @@ -1918,8 +1918,6 @@ static int null_validate_conf(struct nullb_device *dev)

    if (dev->poll_queues > g_poll_queues)
    dev->poll_queues = g_poll_queues;
    - else if (dev->poll_queues == 0)
    - dev->poll_queues = 1;
    dev->prev_poll_queues = dev->poll_queues;

    dev->queue_mode = min_t(unsigned int, dev->queue_mode, NULL_Q_MQ);
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-01-25 04:39    [W:4.032 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site