qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 07/25] assertions for block_int global state API


From: Hanna Reitz
Subject: Re: [PATCH v4 07/25] assertions for block_int global state API
Date: Tue, 16 Nov 2021 17:46:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 16.11.21 16:43, Emanuele Giuseppe Esposito wrote:


On 12/11/2021 14:51, Hanna Reitz wrote:
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                         | 17 +++++++++++++++++
  block/backup.c                  |  1 +
  block/block-backend.c           |  3 +++
  block/commit.c                  |  2 ++
  block/dirty-bitmap.c            |  1 +
  block/io.c                      |  6 ++++++
  block/mirror.c                  |  4 ++++
  block/monitor/bitmap-qmp-cmds.c |  6 ++++++
  block/stream.c                  |  2 ++
  blockdev.c                      |  7 +++++++
  10 files changed, 49 insertions(+)

diff --git a/block.c b/block.c
index 672f946065..41c5883c5c 100644
--- a/block.c
+++ b/block.c

[...]

@@ -7473,6 +7488,7 @@ static bool append_strong_runtime_options(QDict *d, BlockDriverState *bs)
   * would result in exactly bs->backing. */
  bool bdrv_backing_overridden(BlockDriverState *bs)
  {
+    assert(qemu_in_main_thread());
      if (bs->backing) {
          return strcmp(bs->auto_backing_file,
                        bs->backing->bs->filename);

This function is in block_int-common.h, though.

Can go as GS, since it is under BQL.

(Actually, it is only used in block.c, so if you want I can put it as static). Otherwise, I will just move it to GS.

Sounds good to me.

Hanna




reply via email to

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