Skip to contentSkip to conversation

block: remove bdrv_coroutine_enter

PATCH Applied Paolo Bonzini 2 participants 2 messages Dec 15, 2022 – Jan 17, 2023 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: remove bdrv_coroutine_enter

It has only one caller---inline it and remove the function.

---
 block.c                  | 6 ------
 block/block-backend.c    | 2 +-
 include/block/block-io.h | 5 -----
 3 files changed, 1 insertion(+), 12 deletions(-)
block.c +0 -6
index 9c2ac757e495..3f2bd128570e 100644
@@ -7177,12 +7177,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();
block/block-backend.c +1 -1
index 2852a892de6c..a3e7901f291e 100644
@@ -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) {
include/block/block-io.h +0 -5
index 2ed6214909d8..1fa717a545a0 100644
@@ -210,11 +210,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);
Signature · 1 line
2.38.1
Applied
#1 lore raw

Am 15.12.2022 um 14:02 hat Paolo Bonzini geschrieben:

Quoted 3 lines

It has only one caller---inline it and remove the function.

Thanks, applied to the block branch.

Kevin