qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 3/4] include/sysemu/block-backend: split header into I/O


From: Stefan Hajnoczi
Subject: Re: [RFC PATCH 3/4] include/sysemu/block-backend: split header into I/O and graph API
Date: Mon, 13 Sep 2021 14:41:09 +0100

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]