aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-12-15 14:02:24 +0100
committerKevin Wolf <kwolf@redhat.com>2023-01-24 18:26:41 +0100
commit3d65110f0cd453ac5a5a9c4211902271775eba75 (patch)
treecd5c560e6582f3aac562be4f683da27391ec0909
parent264dcbb2b1e5b66d7a5b08662b200c2b315dce0f (diff)
block: remove bdrv_coroutine_enter
It has only one caller---inline it and remove the function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20221215130225.476477-2-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block.c6
-rw-r--r--block/block-backend.c2
-rw-r--r--include/block/block-io.h5
3 files changed, 1 insertions, 12 deletions
diff --git a/block.c b/block.c
index b4a89207ad..ad92fdf1b3 100644
--- a/block.c
+++ b/block.c
@@ -7178,12 +7178,6 @@ void coroutine_fn bdrv_co_unlock(BlockDriverState *bs)
}
}
-void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co)
-{
- IO_CODE();
- aio_co_enter(bdrv_get_aio_context(bs), co);
-}
-
static void bdrv_do_remove_aio_context_notifier(BdrvAioNotifier *ban)
{
GLOBAL_STATE_CODE();
diff --git a/block/block-backend.c b/block/block-backend.c
index ba7bf1d6bc..8fbb787f41 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1555,7 +1555,7 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
acb->has_returned = false;
co = qemu_coroutine_create(co_entry, acb);
- bdrv_coroutine_enter(blk_bs(blk), co);
+ aio_co_enter(blk_get_aio_context(blk), co);
acb->has_returned = true;
if (acb->rwco.ret != NOT_DONE) {
diff --git a/include/block/block-io.h b/include/block/block-io.h
index 3398351596..8d571ec2fb 100644
--- a/include/block/block-io.h
+++ b/include/block/block-io.h
@@ -213,11 +213,6 @@ AioContext *coroutine_fn bdrv_co_enter(BlockDriverState *bs);
*/
void coroutine_fn bdrv_co_leave(BlockDriverState *bs, AioContext *old_ctx);
-/**
- * Transfer control to @co in the aio context of @bs
- */
-void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co);
-
AioContext *child_of_bds_get_parent_aio_context(BdrvChild *c);
void bdrv_io_plug(BlockDriverState *bs);