aboutsummaryrefslogtreecommitdiff
path: root/block/vdi.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-02-03 16:21:55 +0100
committerKevin Wolf <kwolf@redhat.com>2023-02-23 19:49:23 +0100
commit4ec8df0183d0906ae6704d65ef6d8082c970ecdf (patch)
tree45fc829fcb4ea5851b8547cfce9d79ae7a73875e /block/vdi.c
parent7b9e8b22bca534e0e86915c0856d77a7ae99e160 (diff)
downloadqemu-4ec8df0183d0906ae6704d65ef6d8082c970ecdf.zip
qemu-4ec8df0183d0906ae6704d65ef6d8082c970ecdf.tar.gz
qemu-4ec8df0183d0906ae6704d65ef6d8082c970ecdf.tar.bz2
block: Mark bdrv_co_create() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_create() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-17-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vdi.c')
-rw-r--r--block/vdi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/vdi.c b/block/vdi.c
index b50c0b7..f2434d6 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -898,10 +898,9 @@ static int coroutine_fn vdi_co_create(BlockdevCreateOptions *create_options,
return vdi_co_do_create(create_options, DEFAULT_CLUSTER_SIZE, errp);
}
-static int coroutine_fn vdi_co_create_opts(BlockDriver *drv,
- const char *filename,
- QemuOpts *opts,
- Error **errp)
+static int coroutine_fn GRAPH_RDLOCK
+vdi_co_create_opts(BlockDriver *drv, const char *filename,
+ QemuOpts *opts, Error **errp)
{
QDict *qdict = NULL;
BlockdevCreateOptions *create_options = NULL;