Skip to content
Snippets Groups Projects
Commit 785fd158 authored by Ming Lei's avatar Ming Lei
Browse files

nbd: Fix hung on disconnect request if socket is closed before

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2083917



commit 491bf8f2
Author: Xie Yongji <xieyongji@bytedance.com>
Date:   Tue Mar 22 16:06:39 2022 +0800

    nbd: Fix hung on disconnect request if socket is closed before

    When userspace closes the socket before sending a disconnect
    request, the following I/O requests will be blocked in
    wait_for_reconnect() until dead timeout. This will cause the
    following disconnect request also hung on blk_mq_quiesce_queue().
    That means we have no way to disconnect a nbd device if there
    are some I/O requests waiting for reconnecting until dead timeout.
    It's not expected. So let's wake up the thread waiting for
    reconnecting directly when a disconnect request is sent.

Reported-by: default avatarXu Jianhai <zero.xu@bytedance.com>
Signed-off-by: default avatarXie Yongji <xieyongji@bytedance.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Link: https://lore.kernel.org/r/20220322080639.142-1-xieyongji@bytedance.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>

Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
parent cad2295c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment