]> git.proxmox.com Git - mirror_qemu.git/commit
block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 10 Jun 2021 10:08:00 +0000 (13:08 +0300)
committerEric Blake <eblake@redhat.com>
Fri, 18 Jun 2021 17:21:22 +0000 (12:21 -0500)
commita71d597b989fd701b923f09b3c20ac4fcaa55e81
tree4b261177454c8b0ae344e3d6e49214b42eda92bf
parent97cf89259e4e0455c3b2742911737de5969dc0de
block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()

The only last step we need to reuse the function is coroutine-wrapper.
nbd_open() may be called from non-coroutine context. So, generate the
wrapper and use it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210610100802.5888-31-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/coroutines.h
block/nbd.c