On 21.01.22 18:05, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito <[email protected]>
---
block.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/block.c b/block.c
index 448fb9d76f..ca16d90627 100644
--- a/block.c
+++ b/block.c
[...]
@@ -2120,6 +2121,7 @@ bool bdrv_is_writable(BlockDriverState *bs)
static char *bdrv_child_user_desc(BdrvChild *c)
{
+ assert(qemu_in_main_thread());
return c->klass->get_parent_desc(c);
}
Quick note: Whether we really want this depends on whether we find that
`.get_parent_desc()` really should be a GS-only function.
Since I leave that up to you, though (and this patch interestingly (and
correctly) doesn’t add an assertion to bdrv_get_parent_name(), even
though that calls `.get_name()`, which the previous patch did classify
as GS):
Reviewed-by: Hanna Reitz <[email protected]>