diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-06-10 13:08:00 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-06-18 12:21:22 -0500 |
commit | a71d597b989fd701b923f09b3c20ac4fcaa55e81 (patch) | |
tree | 4b261177454c8b0ae344e3d6e49214b42eda92bf /block/coroutines.h | |
parent | 97cf89259e4e0455c3b2742911737de5969dc0de (diff) | |
download | qemu-a71d597b989fd701b923f09b3c20ac4fcaa55e81.zip |
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>
Diffstat (limited to 'block/coroutines.h')
-rw-r--r-- | block/coroutines.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/coroutines.h b/block/coroutines.h index 4cfb4946e6..514d169d23 100644 --- a/block/coroutines.h +++ b/block/coroutines.h @@ -66,4 +66,10 @@ int coroutine_fn bdrv_co_readv_vmstate(BlockDriverState *bs, int coroutine_fn bdrv_co_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); +int generated_co_wrapper +nbd_do_establish_connection(BlockDriverState *bs, Error **errp); +int coroutine_fn +nbd_co_do_establish_connection(BlockDriverState *bs, Error **errp); + + #endif /* BLOCK_COROUTINES_INT_H */ |