[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>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 20/42] job: Move pause/resume functions to Job, (continued)
- [Qemu-devel] [PATCH 22/42] job: Move BlockJobCreateFlags to Job, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 18/42] job: Move coroutine and related code to Job, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 24/42] job: Add job_event_*(), Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 26/42] job: Convert block_job_cancel_async() to Job, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 25/42] job: Move single job finalisation to Job, Kevin Wolf, 2018/05/09
- Re: [Qemu-devel] [PATCH 25/42] job: Move single job finalisation to Job,
Max Reitz <=
- [Qemu-devel] [PATCH 27/42] job: Add job_drain(), Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 28/42] job: Move .complete callback to Job, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 29/42] job: Move job_finish_sync() to Job, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 30/42] job: Switch transactions to JobTxn, Kevin Wolf, 2018/05/09
- [Qemu-devel] [PATCH 34/42] job: Add job_dismiss(), Kevin Wolf, 2018/05/09