qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [RFC v4 19/21] blockjobs: Expose manual property


From: Kevin Wolf
Subject: Re: [Qemu-block] [RFC v4 19/21] blockjobs: Expose manual property
Date: Wed, 28 Feb 2018 19:25:26 +0100
User-agent: Mutt/1.9.1 (2017-09-22)

Am 24.02.2018 um 00:51 hat John Snow geschrieben:
> Expose the "manual" property via QAPI for the backup-related jobs.
> As of this commit, this allows the management API to request the
> "concluded" and "dismiss" semantics for backup jobs.
> 
> Signed-off-by: John Snow <address@hidden>
> ---
>  blockdev.c           | 19 ++++++++++++++++---
>  qapi/block-core.json | 32 ++++++++++++++++++++++++++------
>  2 files changed, 42 insertions(+), 9 deletions(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index 05fd421cdc..2eddb0e726 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -3260,7 +3260,7 @@ static BlockJob *do_drive_backup(DriveBackup *backup, 
> BlockJobTxn *txn,
>      AioContext *aio_context;
>      QDict *options = NULL;
>      Error *local_err = NULL;
> -    int flags;
> +    int flags, job_flags = BLOCK_JOB_DEFAULT;
>      int64_t size;
>      bool set_backing_hd = false;
>  
> @@ -3279,6 +3279,9 @@ static BlockJob *do_drive_backup(DriveBackup *backup, 
> BlockJobTxn *txn,
>      if (!backup->has_job_id) {
>          backup->job_id = NULL;
>      }
> +    if (!backup->has_manual) {
> +        backup->manual = false;
> +    }

I think this is unnecessary these days, NULL/0/false is the default
value for QMP/QAPI.

>      if (!backup->has_compress) {
>          backup->compress = false;
>      }
> @@ -3422,6 +3429,9 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, 
> BlockJobTxn *txn,
>      if (!backup->has_job_id) {
>          backup->job_id = NULL;
>      }
> +    if (!backup->has_manual) {
> +        backup->manual = false;
> +    }

Same here.

>      if (!backup->has_compress) {
>          backup->compress = false;
>      }

Kevin



reply via email to

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