Received: from eggs.gnu.org ([2001:4830:134:3::10]:34453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwvVn-0003X7-2J for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:36:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwvVl-0004jS-I2 for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:36:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwvUN-00048y-Fb for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:35:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6AEZQmJ001643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Jul 2013 10:35:26 -0400 Date: Wed, 10 Jul 2013 16:35:24 +0200 From: Kevin Wolf Message-ID: <20130710143524.GS3898@dhcp-200-207.str.redhat.com> References: <1372248718-27953-1-git-send-email-stefanha@redhat.com> <1372248718-27953-2-git-send-email-stefanha@redhat.com> <51DD703D.1060602@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51DD703D.1060602@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Paolo Bonzini , imain@redhat.com, Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi Am 10.07.2013 um 16:31 hat Eric Blake geschrieben: > On 06/26/2013 06:11 AM, Stefan Hajnoczi wrote: > > The drive-backup command is similar to the drive-mirror command, except > > no guest data written after the command executes gets copied. Add a > > sync mode argument which determines whether the entire disk is copied, > > just allocated clusters, or only clusters being written to by the guest. > > > > Currently only sync mode 'full' is supported - it copies the entire disk. > > For read-only point-in-time snapshots we may only need sync mode 'none' > > since the target can be a qcow2 file using the guest's disk as its > > backing file (no need to copy the entire disk). Finally, sync mode > > 'top' is useful if we wish to preserve the backing chain. > > > > Note that this patch just adds the sync mode argument to drive-backup. > > It does not implement sync modes 'top' or 'none'. This patch is > > necessary so we can add a drive-backup HMP command that behaves like the > > existing drive-mirror HMP command and takes a sync mode. > > > > Signed-off-by: Stefan Hajnoczi > > --- > > > +++ b/qapi-schema.json > > @@ -1626,6 +1626,10 @@ > > # @format: #optional the format of the new destination, default is to > > # probe if @mode is 'existing', else the format of the source > > # > > +# @sync: what parts of the disk image should be copied to the destination > > +# (all the disk, only the sectors allocated in the topmost image, or > > +# only new I/O). > > +# > > # @mode: #optional whether and how QEMU should create a new image, default is > > # 'absolute-paths'. > > # > > @@ -1647,7 +1651,8 @@ > > ## > > { 'type': 'DriveBackup', > > 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > > - '*mode': 'NewImageMode', '*speed': 'int', > > + 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', > > Making it mandatory is fine, since the command is new to 1.6 (if this > were after 1.6, we'd have to make it optional). > > > # > > +# @sync: what parts of the disk image should be copied to the destination > > +# (all the disk, only the sectors allocated in the topmost image, or > > +# only new I/O). > > This duplication will conflict with Kevin's patch currently on the qmp > queue for 'qapi-schema: Use existing type for drive-backup arguments'; > you may want to coordinate which series gets merged first, and rebase > the other one appropriately. Luiz said he's going to send his pull request today; then I'll rebase my tree and fix this conflict tomorrow. (It's trivial enough that we don't have to go through another version.) > If you do rebase, feel free to add: > Reviewed-by: Eric Blake Thanks, I've added it. Kevin