qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 25/42] job: Move single job finalisation to Job


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 25/42] job: Move single job finalisation to Job
Date: Mon, 14 May 2018 20:46:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-05-09 18:26, Kevin Wolf wrote:
> This moves the finalisation of a single job from BlockJob to Job.
> 
> Some part of this code depends on job transactions, and job transactions
> call this code, we introduce some temporary calls from Job functions to
> BlockJob ones. This will be fixed once transactions move to Job, too.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  include/block/blockjob.h     |   9 ---
>  include/block/blockjob_int.h |  36 -----------
>  include/qemu/job.h           |  53 +++++++++++++++-
>  block/backup.c               |  22 +++----
>  block/commit.c               |   2 +-
>  block/mirror.c               |   2 +-
>  blockjob.c                   | 142 
> ++++++++-----------------------------------
>  job.c                        | 100 +++++++++++++++++++++++++++++-
>  qemu-img.c                   |   2 +-
>  tests/test-blockjob.c        |  10 +--
>  10 files changed, 194 insertions(+), 184 deletions(-)

[...]

> diff --git a/include/qemu/job.h b/include/qemu/job.h
> index 1b4397f9a1..12edb822d8 100644
> --- a/include/qemu/job.h
> +++ b/include/qemu/job.h
> @@ -29,6 +29,7 @@
>  #include "qapi/qapi-types-block-core.h"
>  #include "qemu/queue.h"
>  #include "qemu/coroutine.h"
> +#include "block/aio.h"
>  
>  typedef struct JobDriver JobDriver;
>  
> @@ -105,6 +106,15 @@ typedef struct Job {
>      /** True if this job should automatically dismiss itself */
>      bool auto_dismiss;
>  
> +    /** ret code passed to block_job_completed. */
> +    int ret;

While there is no such function yet, you might not want to mention a
block_job_* function here anyway.

Apart from that, as far as I can see, this comment remains unchanged
even later in this series when block_job_completed() is removed.

So something needs to be changed somewhere, so here is an anticipating

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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