qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 22/25] block_int-common.h: assertions in the callers of Bd


From: Hanna Reitz
Subject: Re: [PATCH v4 22/25] block_int-common.h: assertions in the callers of BdrvChildClass function pointers
Date: Mon, 15 Nov 2021 15:48:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]