From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXtM6-0007sd-BT for qemu-devel@nongnu.org; Fri, 25 May 2012 08:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXtLy-0001cm-Io for qemu-devel@nongnu.org; Fri, 25 May 2012 08:10:53 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:34321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXtLy-0001bp-9a for qemu-devel@nongnu.org; Fri, 25 May 2012 08:10:46 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 May 2012 13:10:42 +0100 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q4PCA0lQ1302726 for ; Fri, 25 May 2012 13:10:01 +0100 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q4PC1UFL028685 for ; Fri, 25 May 2012 08:01:30 -0400 Date: Fri, 25 May 2012 13:09:58 +0100 From: Stefan Hajnoczi Message-ID: <20120525120958.GA4376@stefanha-thinkpad.localdomain> References: <4FB6821A.1080902@redhat.com> <4FBE3A89.8020702@redhat.com> <20120525094357.GC30110@stefanha-thinkpad.localdomain> <4FBF6A30.90505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FBF6A30.90505@redhat.com> Subject: Re: [Qemu-devel] Block job commands in QEMU 1.2 [v2, including support for replication] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Eric Blake , qemu-devel , Ori Mamluk , Luiz Capitulino On Fri, May 25, 2012 at 01:17:04PM +0200, Paolo Bonzini wrote: > Il 25/05/2012 11:43, Stefan Hajnoczi ha scritto: > > On Thu, May 24, 2012 at 03:41:29PM +0200, Paolo Bonzini wrote: > >> Persistent dirty bitmap > >> ======================= > >> > >> A persistent dirty bitmap can be used by management for two reasons. > >> When mirroring is used for continuous replication of storage, to record > >> I/O operations that happened while the replication server is not > >> connected or unavailable. > > > > For incremental backups we also need a dirty bitmap API. This allows > > backup software to determine which blocks are "dirty" in a snapshot. > > The backup software will only copy out the dirty blocks. > > > > (For external snapshots the "dirty bitmap" is actually the qemu-io -c > > map of is_allocated clusters. But for internal snapshots it would be a > > diff of image metadata which results in a real bitmap.) > > Perhaps that be simply a new qemu-img subcommand? It should be possible > to run it while the VM is offline. Then the file that is produced could > be fed to blockdev-dirty-enable. For both continuous replication and incremental backups we cannot require that the guest is shut down in order to collect the dirty bitmap, I think. Also, anything to do with internal snapshots needs to be online since QEMU will still have the image file open and be writing to it. With backing files we have a little bit more wiggle room when QEMU has backing files open read-only. I think we really need a libvirt API because a local file not only has permissions issues but also is not network transparent. The continuous replication server runs on another machine, how will it access the dirty bitmap file? Stefan