|
From: | Hanna Reitz |
Subject: | Re: [PATCH v6 26/33] block_int-common.h: assertions in the callers of BdrvChildClass function pointers |
Date: | Wed, 26 Jan 2022 13:46:15 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 21.01.22 18:05, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> --- 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 <hreitz@redhat.com>
[Prev in Thread] | Current Thread | [Next in Thread] |