Re: [PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-22 Thread Kevin Wolf
Am 21.11.2022 um 16:52 hat Emanuele Giuseppe Esposito geschrieben: > Am 21/11/2022 um 16:30 schrieb Kevin Wolf: > > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > >> Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the > >> functions that it uses are both using

Re: [PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 21/11/2022 um 16:30 schrieb Kevin Wolf: > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >> Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the >> functions that it uses are both using bdrv_get_aio_context, that >> defaults to qemu_get_aio_context() if bs is

Re: [PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-21 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the > functions that it uses are both using bdrv_get_aio_context, that > defaults to qemu_get_aio_context() if bs is NULL. > > Therefore pass NULL to BdrvPollCo to

[PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-16 Thread Emanuele Giuseppe Esposito
Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the functions that it uses are both using bdrv_get_aio_context, that defaults to qemu_get_aio_context() if bs is NULL. Therefore pass NULL to BdrvPollCo to automatically generate a function that create and runs a coroutine in the main