diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2018-01-18 13:43:45 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-03-02 18:39:07 +0100 |
commit | efc75e2a4cf7dfa62c7ccaa9a1016f27e5519003 (patch) | |
tree | d1e5f6e34343a39664427910234fdd7eaf1875b9 /block/crypto.c | |
parent | 13471a40c13bc899c73f1879681da29da292547e (diff) |
block: rename .bdrv_create() to .bdrv_co_create_opts()
BlockDriver->bdrv_create() has been called from coroutine context since
commit 5b7e1542cfa41a281af9629d31cef03704d976e6 ("block: make
bdrv_create adopt coroutine").
Make this explicit by renaming to .bdrv_co_create_opts() and add the
coroutine_fn annotation. This makes it obvious to block driver authors
that they may yield, use CoMutex, or other coroutine_fn APIs.
bdrv_co_create is reserved for the QAPI-based version that Kevin is
working on.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20170705102231.20711-2-stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/crypto.c')
-rw-r--r-- | block/crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/crypto.c b/block/crypto.c index 3df66947c5..2ea116e6db 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -556,9 +556,9 @@ static int block_crypto_open_luks(BlockDriverState *bs, bs, options, flags, errp); } -static int block_crypto_create_luks(const char *filename, - QemuOpts *opts, - Error **errp) +static int coroutine_fn block_crypto_co_create_opts_luks(const char *filename, + QemuOpts *opts, + Error **errp) { return block_crypto_create_generic(Q_CRYPTO_BLOCK_FORMAT_LUKS, filename, opts, errp); @@ -617,7 +617,7 @@ BlockDriver bdrv_crypto_luks = { .bdrv_open = block_crypto_open_luks, .bdrv_close = block_crypto_close, .bdrv_child_perm = bdrv_format_default_perms, - .bdrv_create = block_crypto_create_luks, + .bdrv_co_create_opts = block_crypto_co_create_opts_luks, .bdrv_truncate = block_crypto_truncate, .create_opts = &block_crypto_create_opts_luks, |