From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UedCz-0003xG-To for qemu-devel@nongnu.org; Mon, 20 May 2013 23:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UedCy-0007GV-Qo for qemu-devel@nongnu.org; Mon, 20 May 2013 23:25:53 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:54160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UedCy-0007G4-7q for qemu-devel@nongnu.org; Mon, 20 May 2013 23:25:52 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 May 2013 00:23:08 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 3CA292CE804A for ; Tue, 21 May 2013 13:25:40 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4L3BN0k22282476 for ; Tue, 21 May 2013 13:11:24 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4L3PcLq027710 for ; Tue, 21 May 2013 13:25:38 +1000 Message-ID: <519AE90D.4000005@linux.vnet.ibm.com> Date: Tue, 21 May 2013 11:25:01 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1368628476-19622-1-git-send-email-stefanha@redhat.com> <519479B4.6080906@linux.vnet.ibm.com> <20130516074746.GF1597@stefanha-thinkpad.redhat.com> <5195D531.3000402@linux.vnet.ibm.com> <20130517091435.GA15001@stefanha-thinkpad.redhat.com> In-Reply-To: <20130517091435.GA15001@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 0/8] block: drive-backup live backup command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, imain@redhat.com, Stefan Hajnoczi , Paolo Bonzini , dietmar@proxmox.com 于 2013-5-17 17:14, Stefan Hajnoczi 写道: > On Fri, May 17, 2013 at 02:58:57PM +0800, Wenchao Xia wrote: >> 于 2013-5-16 15:47, Stefan Hajnoczi 写道: >>> On Thu, May 16, 2013 at 02:16:20PM +0800, Wenchao Xia wrote: >>>> After checking the code, I found it possible to add delta data backup >>>> support also, If an additional dirty bitmap was added. >>> >>> I've been thinking about this. Incremental backups need to know which >>> blocks have changed, but keeping a persistent dirty bitmap is expensive >>> and unnecessary. >>> >> Yes, it would be likely another block layer, so hope not do that. > > Not at all, persistent dirty bitmaps need to be part of the block layer > since they need to support any image type - qcow2, Gluster, raw LVM, > etc. > >>> I don't consider block jobs to be "qemu device" layer. It sounds like >>> you think the code should be in bdrv_co_do_writev()? >>> >> I feel a trend of becoming fragility from different solutions, >> and COW is a key feature that block layer provide, so I wonder if it >> can be adjusted under block layer later > > The generic block layer includes more than just block.c. It also > includes block jobs and the qcow2 metadata cache that Dong Xu has > extracted recently, for example. Therefore you need to be more specific > about "what" and "why". > > This copy-on-write backup approach is available as a block job which > runs on top of any BlockDriverState. What concrete change are you > proposing? > Since hard to hide it BlockDriverState now, suggest add some document in qemu about the three snapshot types: qcow2 internal, backing chain, drive-backup, which are all qemu software based snapshot implemention, then user can know the difference with it eaiser. In long term, I hope to form a library expose those in a unified format, perhaps it calls qmp_transaction internally, and make it easier to be offloaded if possible, so hope a abstract-driver structure. -- Best Regards Wenchao Xia