[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/6] blockjob: Introduce block_job_complete_s
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/6] blockjob: Introduce block_job_complete_sync() |
Date: |
Wed, 16 Apr 2014 16:41:24 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 12.04.2014 um 20:57 hat Max Reitz geschrieben:
> Implement block_job_complete_sync() by doing the exact same thing as
> block_job_cancel_sync() does, only with calling block_job_complete()
> instead of block_job_cancel().
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> blockjob.c | 24 ++++++++++++++++++++++--
> include/block/blockjob.h | 15 +++++++++++++++
> 2 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/blockjob.c b/blockjob.c
> index b3ce14c..d12f3ea 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -165,7 +165,9 @@ static void block_job_cancel_cb(void *opaque, int ret)
> data->cb(data->opaque, ret);
> }
>
> -int block_job_cancel_sync(BlockJob *job)
> +static int block_job_finish_sync(BlockJob *job,
> + void (*finish)(BlockJob *, Error **errp),
> + Error **errp)
> {
> struct BlockCancelData data;
> BlockDriverState *bs = job->bs;
> @@ -181,13 +183,31 @@ int block_job_cancel_sync(BlockJob *job)
> data.ret = -EINPROGRESS;
> job->cb = block_job_cancel_cb;
Rename this as block_job_finish_cb?
Kevin