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>
diff --git a/block.c b/block.c
index 8cd16e7..2c00ddd 100644
--- a/block.c
+++ b/block.c
@@ -6298,7 +6298,7 @@
int bdrv_get_flags(BlockDriverState *bs)
{
- GLOBAL_STATE_CODE();
+ IO_CODE();
return bs->open_flags;
}