From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er6Pz-00063s-OM for qemu-devel@nongnu.org; Wed, 28 Feb 2018 13:25:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er6Py-0004S4-Pc for qemu-devel@nongnu.org; Wed, 28 Feb 2018 13:25:31 -0500 Date: Wed, 28 Feb 2018 19:25:26 +0100 From: Kevin Wolf Message-ID: <20180228182526.GN4855@localhost.localdomain> References: <20180223235142.21501-1-jsnow@redhat.com> <20180223235142.21501-20-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180223235142.21501-20-jsnow@redhat.com> Subject: Re: [Qemu-devel] [RFC v4 19/21] blockjobs: Expose manual property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-block@nongnu.org, pkrempa@redhat.com, jtc@redhat.com, qemu-devel@nongnu.org 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 > --- > 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