qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v6 13/33] include/block/blockjob.h: global state API


From: Kevin Wolf
Subject: Re: [PATCH v6 13/33] include/block/blockjob.h: global state API
Date: Mon, 7 Feb 2022 18:26:54 +0100

Am 21.01.2022 um 18:05 hat Emanuele Giuseppe Esposito geschrieben:
> blockjob functions run always under the BQL lock.
> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  include/block/blockjob.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/block/blockjob.h b/include/block/blockjob.h
> index 87fbb3985f..2373dfeb07 100644
> --- a/include/block/blockjob.h
> +++ b/include/block/blockjob.h
> @@ -74,6 +74,13 @@ typedef struct BlockJob {
>      GSList *nodes;
>  } BlockJob;
>  
> +/*
> + * Global state (GS) API. These functions run under the BQL lock.
> + *
> + * See include/block/block-global-state.h for more information about
> + * the GS API.
> + */
> +
>  /**
>   * block_job_next:
>   * @job: A block job, or %NULL.
> @@ -155,6 +162,8 @@ BlockJobInfo *block_job_query(BlockJob *job, Error 
> **errp);
>   */
>  void block_job_iostatus_reset(BlockJob *job);
>  
> +/* Common functions that are neither I/O nor Global State */
> +
>  /**
>   * block_job_is_internal:
>   * @job: The job to determine if it is user-visible or not.

It's a bit random to comment on it for this patch specifically, but I
feel that the comments that separate different categories of interfaces
in a single file are not very easy to visually register.

I don't think we're doing this anywhere yet, but I wonder if it wouldn't
be helpful to use a comment style like this which gives more visibility
to the start and end of sections:

/***********************************************************************
 * Common functions that are neither I/O nor Global State
 */

Not sure what checkpatch thinks about it either... ;-)

Kevin




reply via email to

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