From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agGUz-0004Xf-Vc for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:48:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agGUv-0003VL-Ty for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:48:49 -0400 Date: Wed, 16 Mar 2016 14:48:38 -0400 From: Jeff Cody Message-ID: <20160316184838.GA6359@localhost.localdomain> References: <1457692455-15994-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1457692455-15994-3-git-send-email-xiecl.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457692455-15994-3-git-send-email-xiecl.fnst@cn.fujitsu.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v16 2/8] Backup: clear all bitmap when doing block checkpoint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Changlong Xie Cc: Kevin Wolf , Fam Zheng , qemu block , Jiang Yunhong , Dong Eddie , qemu devel , "Michael R. Hines" , Max Reitz , Gonglei , Stefan Hajnoczi , Paolo Bonzini , "Dr. David Alan Gilbert" , zhanghailiang On Fri, Mar 11, 2016 at 06:34:09PM +0800, Changlong Xie wrote: > From: Wen Congyang > > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Signed-off-by: Changlong Xie > --- > block/backup.c | 15 +++++++++++++++ > include/block/block_int.h | 2 ++ > 2 files changed, 17 insertions(+) > > diff --git a/block/backup.c b/block/backup.c > index 0f1b1bc..b2ba939 100644 > --- a/block/backup.c > +++ b/block/backup.c > @@ -256,6 +256,21 @@ static void backup_abort(BlockJob *job) > } > } > > +void backup_do_checkpoint(BlockJob *job, Error **errp) > +{ > + BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common); > + > + assert(job->driver->job_type == BLOCK_JOB_TYPE_BACKUP); > + > + if (backup_job->sync_mode != MIRROR_SYNC_MODE_NONE) { > + error_setg(errp, "The backup job only supports block checkpoint in" > + " sync=none mode"); > + return; > + } > + > + hbitmap_reset_all(backup_job->bitmap); This variable changed name and type, it is a simple bitmap now called 'done_bitmap' (backup_job->done_bitmap), and type 'unsigned long *'. > +} > + > static const BlockJobDriver backup_job_driver = { > .instance_size = sizeof(BackupBlockJob), > .job_type = BLOCK_JOB_TYPE_BACKUP, > diff --git a/include/block/block_int.h b/include/block/block_int.h > index 704efe5..48f0f1f 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -699,6 +699,8 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target, > BlockCompletionFunc *cb, void *opaque, > BlockJobTxn *txn, Error **errp); > > +void backup_do_checkpoint(BlockJob *job, Error **errp); > + > void blk_set_bs(BlockBackend *blk, BlockDriverState *bs); > > void blk_dev_change_media_cb(BlockBackend *blk, bool load); > -- > 1.9.3 > > > >