[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/20] block: remove unnecessary assert_bdrv_graph_writable()
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH 05/20] block: remove unnecessary assert_bdrv_graph_writable() |
Date: |
Wed, 16 Nov 2022 08:48:35 -0500 |
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>
---
block.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block.c b/block.c
index 4ef537a9f2..afab74d4da 100644
--- a/block.c
+++ b/block.c
@@ -7183,7 +7183,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;
}
@@ -7197,7 +7196,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) {
@@ -7278,7 +7276,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.31.1
- [PATCH 00/20] Protect the block layer with a rwlock: part 1, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 00/20] Protect the block layer with a rwlock: part 1, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 00/20] Protect the block layer with a rwlock: part 1, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 13/20] block-gen: assert that bdrv_co_pwrite_{zeros/sync} is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 05/20] block: remove unnecessary assert_bdrv_graph_writable(),
Emanuele Giuseppe Esposito <=
- [PATCH 02/20] graph-lock: introduce BdrvGraphRWlock structure, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 01/20] block: introduce a lock to protect graph operations, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 11/20] block-gen: assert that bdrv_co_{check/invalidate_cache} are always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 10/20] block-gen: assert that {bdrv/blk}_co_truncate is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 15/20] block-gen: assert that {bdrv/blk}_co_flush is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 19/20] block-gen: assert that bdrv_co_ioctl is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 12/20] block-gen: assert that bdrv_co_pwrite is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 03/20] async: register/unregister aiocontext in graph lock list, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 04/20] block.c: wrlock in bdrv_replace_child_noperm, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 18/20] block-gen: assert that bdrv_co_common_block_status_above is always called with graph rdlock taken, Emanuele Giuseppe Esposito, 2022/11/16