aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorHanna Reitz <hreitz@redhat.com>2022-04-27 13:40:54 +0200
committerKevin Wolf <kwolf@redhat.com>2022-05-04 15:55:23 +0200
commit15aee7ac9587562b1d021959dedc2bbb7e9a9fb3 (patch)
treebde98b035df33ee320172531c6ec21a2fd46efd5 /block.c
parenta81d8d4a7203e4be392f9ad37af104759b7cbda5 (diff)
downloadqemu-15aee7ac9587562b1d021959dedc2bbb7e9a9fb3.zip
qemu-15aee7ac9587562b1d021959dedc2bbb7e9a9fb3.tar.gz
qemu-15aee7ac9587562b1d021959dedc2bbb7e9a9fb3.tar.bz2
block: Classify bdrv_get_flags() as I/O function
This function is safe to call in an I/O context, and qcow2_do_open() does so (invoked in an I/O context by qcow2_co_invalidate_cache()). Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220427114057.36651-2-hreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index 8cd16e7..2c00ddd 100644
--- a/block.c
+++ b/block.c
@@ -6298,7 +6298,7 @@ const char *bdrv_get_device_or_node_name(const BlockDriverState *bs)
int bdrv_get_flags(BlockDriverState *bs)
{
- GLOBAL_STATE_CODE();
+ IO_CODE();
return bs->open_flags;
}