On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
---
block.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block.c b/block.c
index 40c4729b8d..da80e89ad4 100644
--- a/block.c
+++ b/block.c
[...]
@@ -7173,6 +7182,7 @@ static bool bdrv_parent_can_set_aio_context(BdrvChild *c,
AioContext *ctx,
return true;
}
*ignore = g_slist_prepend(*ignore, c);
+ assert(qemu_in_main_thread());
It definitely isn’t wrong to place the assert() here, of course, but
it’s an interesting place nonetheless. In other places it seemed like
you’d prefer to place it above the first non-declaration statement.
Absolutely no need to change it if you don’t want to, just something
that I noticed.
Hanna