|
From: | Emanuele Giuseppe Esposito |
Subject: | Re: [PATCH v5 18/20] jobs: protect job.aio_context with BQL and job_mutex |
Date: | Thu, 10 Mar 2022 11:09:57 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |