diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-06-10 13:07:59 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-06-18 12:21:22 -0500 |
commit | 97cf89259e4e0455c3b2742911737de5969dc0de (patch) | |
tree | 7c228cf801d332fe1a9ce6351b9c34db56c0bdc2 /block/nbd.c | |
parent | 51edbf537d2cbf97c8e9defd098b95ca8a18aa8c (diff) |
nbd/client-connection: add option for non-blocking connection attempt
We'll need a possibility of non-blocking nbd_co_establish_connection(),
so that it returns immediately, and it returns success only if a
connections was previously established in background.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210610100802.5888-30-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/nbd.c')
-rw-r--r-- | block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nbd.c b/block/nbd.c index 8caeafc8d3..bf2e939314 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -364,7 +364,7 @@ static int coroutine_fn nbd_co_do_establish_connection(BlockDriverState *bs, assert(!s->ioc); - s->ioc = nbd_co_establish_connection(s->conn, &s->info, errp); + s->ioc = nbd_co_establish_connection(s->conn, &s->info, true, errp); if (!s->ioc) { return -ECONNREFUSED; } |