aboutsummaryrefslogtreecommitdiff
path: root/block/vhdx.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-06-01 13:51:42 +0200
committerKevin Wolf <kwolf@redhat.com>2023-06-28 09:46:30 +0200
commitf6b08994934f89866b510d335c6273bf998e857b (patch)
tree6b8d2892192eb1d512ddadb27544d4356ba91bad /block/vhdx.h
parent28944f99c473f55b6b5a4210f697f7eec9a9bc23 (diff)
vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Change calls to co_wrappers to use the non-wrapped functions, which in turn requires adding GRAPH_RDLOCK annotations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20230601115145.196465-10-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vhdx.h')
-rw-r--r--block/vhdx.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/vhdx.h b/block/vhdx.h
index 0b74924cee..7db746cd18 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -413,8 +413,9 @@ bool vhdx_checksum_is_valid(uint8_t *buf, size_t size, int crc_offset);
int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s, bool *flushed,
Error **errp);
-int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
- void *data, uint32_t length, uint64_t offset);
+int coroutine_fn GRAPH_RDLOCK
+vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
+ void *data, uint32_t length, uint64_t offset);
static inline void leguid_to_cpus(MSGUID *guid)
{