Am 16/12/2022 um 15:26 schrieb Vladimir Sementsov-Ogievskiy: > On 12/13/22 11:53, Kevin Wolf wrote: >> From: Emanuele Giuseppe Esposito <eespo...@redhat.com> >> >> BlockDriver->bdrv_io_plug is categorized as IO callback, and it >> currently doesn't run in a coroutine. We should let it take a graph >> rdlock since the callback traverses the block nodes graph, which however >> is only possible in a coroutine. >> >> The only caller of this function is blk_io_plug(), therefore make >> blk_io_plug() a co_wrapper, so that we're always running in a coroutine >> where the lock can be taken. >> >> Signed-off-by: Emanuele Giuseppe Esposito <eespo...@redhat.com> >> Signed-off-by: Kevin Wolf <kw...@redhat.com> >> --- > > [..] > >> --- a/include/block/block_int-common.h >> +++ b/include/block/block_int-common.h >> @@ -729,7 +729,7 @@ struct BlockDriver { >> void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent >> event); >> /* io queue for linux-aio */ >> - void (*bdrv_io_plug)(BlockDriverState *bs); >> + void coroutine_fn (*bdrv_io_plug)(BlockDriverState *bs); > > don't we want to rename it to _co_ too? I think you realized this is done in patch 14 Thanks, Emanuele > > anyway: > Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> > > >
- [PATCH 01/14] block-coroutine-wrapper: suppor... Kevin Wolf
- Re: [PATCH 01/14] block-coroutine-wrappe... Vladimir Sementsov-Ogievskiy
- [PATCH 03/14] block: Convert bdrv_io_unplug()... Kevin Wolf
- [PATCH 09/14] block: Convert bdrv_get_info() ... Kevin Wolf
- [PATCH 04/14] block: Rename refresh_total_sec... Kevin Wolf
- Re: [PATCH 04/14] block: Rename refresh_... Vladimir Sementsov-Ogievskiy
- [PATCH 07/14] block: use bdrv_co_refresh_tota... Kevin Wolf
- Re: [PATCH 07/14] block: use bdrv_co_ref... Vladimir Sementsov-Ogievskiy
- [PATCH 02/14] block: Convert bdrv_io_plug() t... Kevin Wolf
- Re: [PATCH 02/14] block: Convert bdrv_io... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 02/14] block: Convert bdr... Emanuele Giuseppe Esposito
- Re: [PATCH 02/14] block: Convert bdrv_io... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 02/14] block: Convert bdr... Emanuele Giuseppe Esposito
- [PATCH 13/14] block: Convert bdrv_debug_event... Kevin Wolf
- [PATCH 05/14] block: Convert bdrv_refresh_tot... Kevin Wolf
- Re: [PATCH 05/14] block: Convert bdrv_re... Vladimir Sementsov-Ogievskiy
- [PATCH 06/14] block-backend: use bdrv_getleng... Kevin Wolf
- Re: [PATCH 06/14] block-backend: use bdr... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 06/14] block-backend: use... Emanuele Giuseppe Esposito
- Re: [PATCH 00/14] block: Move more functions ... Emanuele Giuseppe Esposito