Skip to content

Commit

Permalink
block/nbd: connect_thread_func(): do qio_channel_set_delay(false)
Browse files Browse the repository at this point in the history
nbd_open() does it (through nbd_establish_connection()).
Actually we lost that call on reconnect path in 1dc4718
"block/nbd: use non-blocking connect: fix vm hang on connect()"
when we have introduced reconnect thread.

Fixes: 1dc4718
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210610100802.5888-5-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and ebblake committed Jun 15, 2021
1 parent c2eb3ff commit ee0bb52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/nbd.c
Expand Up @@ -408,6 +408,8 @@ static void *connect_thread_func(void *opaque)
thr->sioc = NULL;
}

qio_channel_set_delay(QIO_CHANNEL(thr->sioc), false);

qemu_mutex_lock(&thr->mutex);

switch (thr->state) {
Expand Down

0 comments on commit ee0bb52

Please sign in to comment.