qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, hreitz@redhat.com, eesposit@redhat.com,
	pbonzini@redhat.com, vsementsov@yandex-team.ru,
	qemu-devel@nongnu.org
Subject: [PATCH 12/18] block: remove unnecessary assert_bdrv_graph_writable()
Date: Wed,  7 Dec 2022 14:18:32 +0100	[thread overview]
Message-ID: <20221207131838.239125-13-kwolf@redhat.com> (raw)
In-Reply-To: <20221207131838.239125-1-kwolf@redhat.com>

From: Emanuele Giuseppe Esposito <eesposit@redhat.com>

We don't protect bdrv->aio_context with the graph rwlock,
so these assertions are not needed

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block.c b/block.c
index df52c6b012..bdffadcdaa 100644
--- a/block.c
+++ b/block.c
@@ -7214,7 +7214,6 @@ static void bdrv_detach_aio_context(BlockDriverState *bs)
     if (bs->quiesce_counter) {
         aio_enable_external(bs->aio_context);
     }
-    assert_bdrv_graph_writable(bs);
     bs->aio_context = NULL;
 }
 
@@ -7228,7 +7227,6 @@ static void bdrv_attach_aio_context(BlockDriverState *bs,
         aio_disable_external(new_context);
     }
 
-    assert_bdrv_graph_writable(bs);
     bs->aio_context = new_context;
 
     if (bs->drv && bs->drv->bdrv_attach_aio_context) {
@@ -7309,7 +7307,6 @@ static void bdrv_set_aio_context_commit(void *opaque)
     BlockDriverState *bs = (BlockDriverState *) state->bs;
     AioContext *new_context = state->new_ctx;
     AioContext *old_context = bdrv_get_aio_context(bs);
-    assert_bdrv_graph_writable(bs);
 
     /*
      * Take the old AioContex when detaching it from bs.
-- 
2.38.1



  parent reply	other threads:[~2022-12-07 13:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 13:18 [PATCH 00/18] block: Introduce a block graph rwlock Kevin Wolf
2022-12-07 13:18 ` [PATCH 01/18] block: Factor out bdrv_drain_all_begin_nopoll() Kevin Wolf
2022-12-07 13:18 ` [PATCH 02/18] graph-lock: Introduce a lock to protect block graph operations Kevin Wolf
2022-12-07 13:18 ` [PATCH 03/18] graph-lock: Implement guard macros Kevin Wolf
2022-12-07 13:18 ` [PATCH 04/18] async: Register/unregister aiocontext in graph lock list Kevin Wolf
2022-12-07 13:18 ` [PATCH 05/18] Import clang-tsa.h Kevin Wolf
2022-12-07 13:18 ` [PATCH 06/18] clang-tsa: Add TSA_ASSERT() macro Kevin Wolf
2022-12-07 13:18 ` [PATCH 07/18] clang-tsa: Add macros for shared locks Kevin Wolf
2022-12-07 13:18 ` [PATCH 08/18] configure: Enable -Wthread-safety if present Kevin Wolf
2022-12-07 13:18 ` [PATCH 09/18] test-bdrv-drain: Fix incorrrect drain assumptions Kevin Wolf
2022-12-07 13:18 ` [PATCH 10/18] block: Fix locking in external_snapshot_prepare() Kevin Wolf
2022-12-07 13:18 ` [PATCH 11/18] block: wrlock in bdrv_replace_child_noperm Kevin Wolf
2022-12-07 13:18 ` Kevin Wolf [this message]
2022-12-07 13:18 ` [PATCH 13/18] block: assert that graph read and writes are performed correctly Kevin Wolf
2022-12-07 13:18 ` [PATCH 14/18] graph-lock: TSA annotations for lock/unlock functions Kevin Wolf
2022-12-07 13:18 ` [PATCH 15/18] Mark assert_bdrv_graph_readable/writable() GRAPH_RD/WRLOCK Kevin Wolf
2022-12-07 13:18 ` [PATCH 16/18] block-coroutine-wrapper.py: introduce annotations that take the graph rdlock Kevin Wolf
2022-12-07 13:18 ` [PATCH 17/18] block: use co_wrapper_mixed_bdrv_rdlock in functions taking the rdlock Kevin Wolf
2022-12-07 13:18 ` [PATCH 18/18] block: GRAPH_RDLOCK for functions only called by co_wrappers Kevin Wolf
2022-12-07 14:12 ` [PATCH 00/18] block: Introduce a block graph rwlock Emanuele Giuseppe Esposito
2022-12-07 16:08   ` Kevin Wolf
2022-12-12 17:14   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221207131838.239125-13-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=eesposit@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).