On Wed, Sep 08, 2021 at 09:10:20AM -0400, Emanuele Giuseppe Esposito wrote: > +/* > + * Graph API. These functions run under the BQL lock. > + * > + * If a function modifies the graph, it uses drain and/or > + * aio_context_acquire/release to be sure it has unique access. > + * > + * All functions in this header must use this assertion: > + * g_assert(qemu_in_main_thread()); > + * to be sure they belong here. > + */
It's important to note that not all of these functions are necessarily limited to running under the BQL, but they would require additional auditing and may small thread-safety changes to move them into the I/O API. Often it's not worth doing that work since the APIs are only used with the BQL held at the moment, so they have been placed in the graph API (for now). Stefan
signature.asc
Description: PGP signature