From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubo7F-000829-Gb for qemu-devel@nongnu.org; Mon, 13 May 2013 04:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubo7E-0004j9-1W for qemu-devel@nongnu.org; Mon, 13 May 2013 04:28:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubo7D-0004iV-O8 for qemu-devel@nongnu.org; Mon, 13 May 2013 04:28:15 -0400 Date: Mon, 13 May 2013 10:28:11 +0200 From: Kevin Wolf Message-ID: <20130513082811.GB6419@dhcp-200-207.str.redhat.com> References: <1367221335-22777-1-git-send-email-stefanha@redhat.com> <1367221335-22777-3-git-send-email-stefanha@redhat.com> <518DC2C6.5030500@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <518DC2C6.5030500@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 2/3] block: add block-backup QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Fam Zheng , qemu-devel@nongnu.org, Wenchao Xia , imain@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com, lcapitulino@redhat.com, dietmar@proxmox.com Am 11.05.2013 um 06:02 hat Eric Blake geschrieben: > On 04/29/2013 01:42 AM, Stefan Hajnoczi wrote: > > @block-backup > > > > +++ b/qapi-schema.json > > @@ -1715,6 +1715,37 @@ > > '*speed': 'int' } } > > > > ## > > +# @block-backup > > +# > > +# Start a point-in-time copy of a block device to a new destination. The > > +# status of ongoing block backup operations can be checked with > > +# query-block-jobs. The operation can be stopped before it has completed using > > +# the block-job-cancel command. > > Still might be worth mentioning that 'query-block-jobs' will list it as > a job of type 'backup'. > > > +# > > +# @device: the name of the device whose writes should be mirrored. > > +# > > +# @target: the target of the new image. If the file exists, or if it > > +# is a device, the existing file/device will be used as the new > > +# destination. If it does not exist, a new file will be created. > > +# > > +# @format: #optional the format of the new destination, default is to > > +# probe if @mode is 'existing', else the format of the source > > +# > > +# @mode: #optional whether and how QEMU should create a new image, default is > > +# 'absolute-paths'. > > +# > > +# @speed: #optional the maximum speed, in bytes per second > > +# > > +# Returns: nothing on success > > +# If @device is not a valid block device, DeviceNotFound > > +# > > +# Since 1.6 > > +## > > +{ 'command': 'block-backup', > > + 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > > Hmm - wondering if we should add an enum type for supported disk formats > instead of using free-form strings. The wire representation would be > the same, and now's the time to do it before we add introspection (it's > more than just this command impacted). And ideally we shouldn't make it a static list that contains every format for which qemu has some code, but only those that are actually compiled in. (Hm, and probably not protocols?) Luiz, any idea how to do something like this, a QAPI enum with values that are determined at runtime? Especially with respect to the coming schema introspection? Kevin