summaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
authorPaolo Bonzini2022-09-22 10:49:00 +0200
committerKevin Wolf2022-10-07 12:11:40 +0200
commit881a4c553c06caa3b05a729b13d3cc781506c3a8 (patch)
tree607b852bc5a9029429437d033358ed647560afa2 /block.c
parentblock/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine context (diff)
downloadqemu-881a4c553c06caa3b05a729b13d3cc781506c3a8.tar.gz
qemu-881a4c553c06caa3b05a729b13d3cc781506c3a8.tar.xz
qemu-881a4c553c06caa3b05a729b13d3cc781506c3a8.zip
block: 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. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220922084924.201610-3-pbonzini@redhat.com> [kwolf: Fixed up coding style] Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block.c b/block.c
index bc85f46eed..9b0fae5c1e 100644
--- a/block.c
+++ b/block.c
@@ -631,9 +631,10 @@ static int64_t create_file_fallback_truncate(BlockBackend *blk,
* Helper function for bdrv_create_file_fallback(): Zero the first
* sector to remove any potentially pre-existing image header.
*/
-static int create_file_fallback_zero_first_sector(BlockBackend *blk,
- int64_t current_size,
- Error **errp)
+static int coroutine_fn
+create_file_fallback_zero_first_sector(BlockBackend *blk,
+ int64_t current_size,
+ Error **errp)
{
int64_t bytes_to_clear;
int ret;