Skip to content

Commit

Permalink
vmdk: make vmdk_is_cid_valid a coroutine_fn
Browse files Browse the repository at this point in the history
Functions that can do I/O are prime candidates for being coroutine_fns.  Make the
change for the one that is itself called only from coroutine_fns.  Unfortunately
vmdk does not use a coroutine_fn for the bulk of the open (like qcow2 does) so
vmdk_read_cid cannot have the same treatment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230309084456.304669-10-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
bonzini authored and kevmw committed Apr 25, 2023
1 parent a39bae4 commit 5a5a9fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/vmdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static int vmdk_write_cid(BlockDriverState *bs, uint32_t cid)
return ret;
}

static int vmdk_is_cid_valid(BlockDriverState *bs)
static int coroutine_fn vmdk_is_cid_valid(BlockDriverState *bs)
{
BDRVVmdkState *s = bs->opaque;
uint32_t cur_pcid;
Expand Down

0 comments on commit 5a5a9fd

Please sign in to comment.