diff options
| author | Yang Erkun <yangerkun@huawei.com> | 2026-08-05 20:29:29 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-08-15 20:01:20 -0600 |
| commit | a9d414b4a15c69b5389da3ec08f23e9f2926c52a (patch) | |
| tree | 67b412e53a6c25ef87d49f9539ba127561e943d4 /scripts/Makefile.thinlto | |
| parent | f8d21c590e55d629abed675554b186291ac08915 (diff) | |
| download | linux-stable-a9d414b4a15c69b5389da3ec08f23e9f2926c52a.tar.gz linux-stable-a9d414b4a15c69b5389da3ec08f23e9f2926c52a.zip | |
nbd: remove queue freeze for newly created nbd from netlink path
Previous commits has removed the queue freeze in nbd_add_socket and
nbd_set_size during nbd device setup. However, a queue freeze can still
occur when nbd_start_device calls blk_mq_update_nr_hw_queues if the
socket connection count does not match nbd->tag_set->nr_hw_queues.
The nbd_start_device function can be invoked through either the ioctl or
netlink paths. The ioctl path only allows reusing an existing inactivate
nbd device, there is nothing more we can do to prevent the queue freeze
since the old nbd->tag_set->nr_hw_queues may not match the new socket
connection count. Similarly, the netlink path can reuse a preferred
inactivate nbd device, and again, we cannot do more in this scenario.
However, the netlink path can also add a new nbd device using
nbd_dev_add. In this case, we can obtain the new number of socket
connections, and by adding a new argument representing the expected
nr_hw_queues in nbd_dev_add, we can ensure the queue freeze is avoided
for this situation.
Reviewed-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Link: https://patch.msgid.link/20260805122930.57647-8-yangerkun@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
