mirror of https://github.com/xemu-project/xemu.git
copy-before-write: add missing coroutine_fn annotations
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria <afaria@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220922084924.201610-16-pbonzini@redhat.com> [kwolf: Fixed up coding style] Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
050ed2e736
commit
3e614042c4
|
@ -203,9 +203,9 @@ static int coroutine_fn cbw_co_flush(BlockDriverState *bs)
|
||||||
* It's guaranteed that guest writes will not interact in the region until
|
* It's guaranteed that guest writes will not interact in the region until
|
||||||
* cbw_snapshot_read_unlock() called.
|
* cbw_snapshot_read_unlock() called.
|
||||||
*/
|
*/
|
||||||
static BlockReq *cbw_snapshot_read_lock(BlockDriverState *bs,
|
static coroutine_fn BlockReq *
|
||||||
int64_t offset, int64_t bytes,
|
cbw_snapshot_read_lock(BlockDriverState *bs, int64_t offset, int64_t bytes,
|
||||||
int64_t *pnum, BdrvChild **file)
|
int64_t *pnum, BdrvChild **file)
|
||||||
{
|
{
|
||||||
BDRVCopyBeforeWriteState *s = bs->opaque;
|
BDRVCopyBeforeWriteState *s = bs->opaque;
|
||||||
BlockReq *req = g_new(BlockReq, 1);
|
BlockReq *req = g_new(BlockReq, 1);
|
||||||
|
@ -240,7 +240,8 @@ static BlockReq *cbw_snapshot_read_lock(BlockDriverState *bs,
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cbw_snapshot_read_unlock(BlockDriverState *bs, BlockReq *req)
|
static coroutine_fn void
|
||||||
|
cbw_snapshot_read_unlock(BlockDriverState *bs, BlockReq *req)
|
||||||
{
|
{
|
||||||
BDRVCopyBeforeWriteState *s = bs->opaque;
|
BDRVCopyBeforeWriteState *s = bs->opaque;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue