[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 24/25] job.h: split function pointers in JobDriver
From: |
Stefan Hajnoczi |
Subject: |
Re: [RFC PATCH v2 24/25] job.h: split function pointers in JobDriver |
Date: |
Thu, 7 Oct 2021 15:54:41 +0100 |
On Tue, Oct 05, 2021 at 10:32:14AM -0400, Emanuele Giuseppe Esposito wrote:
> The job API will be handled separately in another serie.
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> include/qemu/job.h | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/include/qemu/job.h b/include/qemu/job.h
> index 41162ed494..c236c43026 100644
> --- a/include/qemu/job.h
> +++ b/include/qemu/job.h
> @@ -169,12 +169,21 @@ typedef struct Job {
> * Callbacks and other information about a Job driver.
> */
> struct JobDriver {
> +
> + /* Fields initialized in struct definition and never changed. */
> +
> /** Derived Job struct size */
> size_t instance_size;
>
> /** Enum describing the operation */
> JobType job_type;
>
> + /*
> + * I/O API functions. These functions are thread-safe, and therefore
> + * can run in any thread as long as they have called
> + * aio_context_acquire/release().
> + */
This comment described the block layer well but job.h is more generic. I
don't think these functions are necessarily thread-safe (they shouldn't
be invoked from multiple threads at the same time). It's just that they
are run without regard to the BQL and may run in an arbitrary thread.
Other than that:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- Re: [RFC PATCH v2 15/25] include/block/snapshot: global state API + assertions, (continued)
- [RFC PATCH v2 19/25] block_int-common.h: split function pointers in BlockDriver, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 21/25] block_int-common.h: split function pointers in BdrvChildClass, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 22/25] block_int-common.h: assertions in the callers of BdrvChildClass function pointers, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 24/25] job.h: split function pointers in JobDriver, Emanuele Giuseppe Esposito, 2021/10/05
- Re: [RFC PATCH v2 24/25] job.h: split function pointers in JobDriver,
Stefan Hajnoczi <=
- [RFC PATCH v2 25/25] job.h: assertions in the callers of JobDriver funcion pointers, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 23/25] block-backend-common.h: split function pointers in BlockDevOps, Emanuele Giuseppe Esposito, 2021/10/05