Am 08/03/2022 um 14:41 schrieb Stefan Hajnoczi: > It's not clear to me that .get_parent_aio_context() should only be > called from the main thread. The API is read-only so someone might try > to call from I/O code in the future expecting it to work like other > read-only graph APIs that are available from I/O code. > > Currently the assertion is true because the only user is > bdrv_attach_child_*() but please document this invariant for > bdrv_child_get_parent_aio_context() and the callback. Maybe move the > assertion into a higher-level function like > bdrv_child_get_parent_aio_context() (if that still covers all cases). We classified .get_parent_aio_context as GS callback, and indeed bdrv_child_get_parent_aio_context has the macro GLOBAL_STATE_CODE(); So we should be fine. Emanuele
- Re: [PATCH v5 09/20] jobs: add job lock in... Stefan Hajnoczi
- Re: [PATCH v5 09/20] jobs: add job loc... Emanuele Giuseppe Esposito
- [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT... Emanuele Giuseppe Esposito
- Re: [PATCH v5 05/20] aio-wait.h: introduce... Stefan Hajnoczi
- [PATCH v5 10/20] jobs: use job locks also in th... Emanuele Giuseppe Esposito
- [PATCH v5 11/20] block/mirror.c: use of job hel... Emanuele Giuseppe Esposito
- Re: [PATCH v5 11/20] block/mirror.c: use o... Stefan Hajnoczi
- [PATCH v5 12/20] jobs: rename static functions ... Emanuele Giuseppe Esposito
- [PATCH v5 18/20] jobs: protect job.aio_context ... Emanuele Giuseppe Esposito
- Re: [PATCH v5 18/20] jobs: protect job.aio... Stefan Hajnoczi
- Re: [PATCH v5 18/20] jobs: protect job... Emanuele Giuseppe Esposito
- [PATCH v5 15/20] job.h: define unlocked functio... Emanuele Giuseppe Esposito
- [PATCH v5 16/20] commit and mirror: create new ... Emanuele Giuseppe Esposito
- Re: [PATCH v5 16/20] commit and mirror: cr... Stefan Hajnoczi
- [PATCH v5 20/20] block_job_query: remove atomic... Emanuele Giuseppe Esposito
- Re: [PATCH v5 20/20] block_job_query: remo... Stefan Hajnoczi
- [PATCH v5 14/20] block_job: rename block_job fu... Emanuele Giuseppe Esposito
- [PATCH v5 17/20] job: detect change of aioconte... Emanuele Giuseppe Esposito
- Re: [PATCH v5 17/20] job: detect change of... Stefan Hajnoczi