From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agMci-0002i8-KN for qemu-devel@nongnu.org; Wed, 16 Mar 2016 21:21:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agMch-0006z1-JJ for qemu-devel@nongnu.org; Wed, 16 Mar 2016 21:21:12 -0400 Message-ID: <56EA06F0.4020108@cn.fujitsu.com> Date: Thu, 17 Mar 2016 09:22:56 +0800 From: Changlong Xie MIME-Version: 1.0 References: <1457692455-15994-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1457692455-15994-3-git-send-email-xiecl.fnst@cn.fujitsu.com> <20160316184838.GA6359@localhost.localdomain> In-Reply-To: <20160316184838.GA6359@localhost.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit 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: Jeff Cody 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 03/17/2016 02:48 AM, Jeff Cody wrote: > 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 *'. Thanks for pointing it out, will fix in next version. Thanks -Xie > >> +} >> + >> 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 >> >> >> >> > > > . >