From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org
Subject: [PATCH 9/9] vmdk: make vmdk_is_cid_valid a coroutine_fn
Date: Thu, 9 Mar 2023 09:44:56 +0100 [thread overview]
Message-ID: <20230309084456.304669-10-pbonzini@redhat.com> (raw)
In-Reply-To: <20230309084456.304669-1-pbonzini@redhat.com>
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>
---
block/vmdk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index f5f49018fe4a..3f8c731e32e8 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -376,7 +376,7 @@ out:
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;
--
2.39.2
next prev parent reply other threads:[~2023-03-09 8:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 8:44 [PATCH 0/9] (mostly) block: add more coroutine_fn annotations, use bdrv/blk_co_* Paolo Bonzini
2023-03-09 8:44 ` [PATCH 1/9] vvfat: mark various functions as coroutine_fn Paolo Bonzini
2023-03-09 8:44 ` [PATCH 2/9] blkdebug: add missing coroutine_fn annotation Paolo Bonzini
2023-03-09 8:44 ` [PATCH 3/9] mirror: make mirror_flush a coroutine_fn, do not use co_wrappers Paolo Bonzini
2023-03-09 8:44 ` [PATCH 4/9] nbd: mark more coroutine_fns, " Paolo Bonzini
2023-03-09 15:40 ` Eric Blake
2023-03-09 8:44 ` [PATCH 5/9] 9pfs: mark more coroutine_fns Paolo Bonzini
2023-03-09 9:23 ` Christian Schoenebeck
2023-03-09 8:44 ` [PATCH 6/9] qemu-pr-helper: " Paolo Bonzini
2023-03-09 8:44 ` [PATCH 7/9] tests: " Paolo Bonzini
2023-03-09 8:44 ` [PATCH 8/9] qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK Paolo Bonzini
2023-03-09 8:44 ` Paolo Bonzini [this message]
2023-03-23 15:02 ` [PATCH 0/9] (mostly) block: add more coroutine_fn annotations, use bdrv/blk_co_* Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230309084456.304669-10-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).