[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 01/10] block.c: assert bs->aio_context is written under BQL an
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v3 01/10] block.c: assert bs->aio_context is written under BQL and drains |
Date: |
Tue, 25 Oct 2022 04:49:43 -0400 |
Also here ->aio_context is read by I/O threads and written
under BQL.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index 554ce727c3..529be80759 100644
--- a/block.c
+++ b/block.c
@@ -7153,6 +7153,7 @@ 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;
}
@@ -7166,6 +7167,7 @@ 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) {
--
2.31.1
- [PATCH v3 00/10] Refactor bdrv_try_set_aio_context using transactions, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 04/10] blockjob: implement .change_aio_ctx in child_job, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 09/10] block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 08/10] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 05/10] block: implement .change_aio_ctx in child_of_bds, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 10/10] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 03/10] bdrv_change_aio_context: use hash table instead of list of visited nodes, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 01/10] block.c: assert bs->aio_context is written under BQL and drains,
Emanuele Giuseppe Esposito <=
- [PATCH v3 07/10] block: use the new _change_ API instead of _can_set_ and _set_, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 06/10] block-backend: implement .change_aio_ctx in child_root, Emanuele Giuseppe Esposito, 2022/10/25
- [PATCH v3 02/10] block: use transactions as a replacement of ->{can_}set_aio_context(), Emanuele Giuseppe Esposito, 2022/10/25
- Re: [PATCH v3 00/10] Refactor bdrv_try_set_aio_context using transactions, Kevin Wolf, 2022/10/25