From: Bart Van Assche Date: Mon, 15 Aug 2022 17:00:42 +0000 (-0700) Subject: null_blk: Modify the behavior of null_map_queues() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=10b41ea15e81a5597bc5944a7900e9a790bd984a;p=linux.git null_blk: Modify the behavior of null_map_queues() Instead of returning -EINVAL if an internal inconsistency is detected, fall back to a single submission queue. This patch prepares for changing the return value of the .map_queues() callbacks into void. Cc: Christoph Hellwig Cc: Keith Busch Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20220815170043.19489-2-bvanassche@acm.org Signed-off-by: Jens Axboe --- diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index c451c477978ff..535059209693b 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1555,7 +1555,9 @@ static int null_map_queues(struct blk_mq_tag_set *set) } else { pr_warn("tag set has unexpected nr_hw_queues: %d\n", set->nr_hw_queues); - return -EINVAL; + WARN_ON_ONCE(true); + submit_queues = 1; + poll_queues = 0; } }