[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/58] block.c: assert bs->aio_context is written under BQL and dr
From: |
Kevin Wolf |
Subject: |
[PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains |
Date: |
Thu, 27 Oct 2022 20:31:11 +0200 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
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>
Message-Id: <20221025084952.2139888-2-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index 2d74bfe665..4d727aa38c 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.37.3
- [PULL 36/58] monitor: add missing coroutine_fn annotation, (continued)
- [PULL 36/58] monitor: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 50/58] parallels: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_, Kevin Wolf, 2022/10/27
- [PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions, Kevin Wolf, 2022/10/27
- [PULL 55/58] vhdx: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 53/58] qed: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 27/58] block: implement .change_aio_ctx in child_of_bds, Kevin Wolf, 2022/10/27
- [PULL 49/58] mirror: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 37/58] ssh: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 26/58] blockjob: implement .change_aio_ctx in child_job, Kevin Wolf, 2022/10/27
- [PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains,
Kevin Wolf <=
- [PULL 38/58] block: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27
- [PULL 44/58] qcow: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 47/58] commit: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 46/58] vmdk: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27
- [PULL 51/58] qcow: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 45/58] qcow2: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 58/58] block/block-backend: blk_set_enable_write_cache is IO_CODE, Kevin Wolf, 2022/10/27
- [PULL 57/58] monitor: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- Re: [PULL 00/58] Block layer patches, Stefan Hajnoczi, 2022/10/30