diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2023-09-29 16:51:54 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-12 16:31:33 +0200 |
| commit | 3574499a1e5e420c3e72d0e283cfb2b13bce672e (patch) | |
| tree | c2768e9ced1818ce93874979c8d614c6d49c06b9 /qemu-io-cmds.c | |
| parent | 018f9dea9c905506c49f8f37c018470dddfc50f1 (diff) | |
| download | focaccia-qemu-3574499a1e5e420c3e72d0e283cfb2b13bce672e.tar.gz focaccia-qemu-3574499a1e5e420c3e72d0e283cfb2b13bce672e.zip | |
block: Mark bdrv_get_specific_info() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_get_specific_info() need to hold a reader lock for the graph. This removes an assume_graph_lock() call in vmdk's implementation. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-20-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io-cmds.c')
| -rw-r--r-- | qemu-io-cmds.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 3f75d2f5a6..f5d7202a13 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -2037,6 +2037,9 @@ static int info_f(BlockBackend *blk, int argc, char **argv) char s1[64], s2[64]; int ret; + GLOBAL_STATE_CODE(); + GRAPH_RDLOCK_GUARD_MAINLOOP(); + if (bs->drv && bs->drv->format_name) { printf("format name: %s\n", bs->drv->format_name); } |