From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbsVw-0008R1-RS for qemu-devel@nongnu.org; Mon, 13 May 2013 09:10:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbsVu-0004qO-2l for qemu-devel@nongnu.org; Mon, 13 May 2013 09:10:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbsVt-0004n2-Pd for qemu-devel@nongnu.org; Mon, 13 May 2013 09:10:01 -0400 Date: Mon, 13 May 2013 15:09:31 +0200 From: Kevin Wolf Message-ID: <20130513130931.GC6419@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> <20130513082811.GB6419@dhcp-200-207.str.redhat.com> <5190E30E.40005@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5190E30E.40005@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 13.05.2013 um 14:56 hat Eric Blake geschrieben: > On 05/13/2013 02:28 AM, Kevin Wolf wrote: > > >>> +{ '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? > > Or maybe we make the 'enum' list ALL possible types, but then add a > query-* command that returns an array of only those enum values that are > supported. Introspection would see all types, but the query command > would be the useful variant that is runtime-dependent. Then is there any advantage in making it an enum in the first place? Can libvirt really make use of the information "this qemu version could have been compiled with VHDX support, but it hasn't"? Kevin