Received: from eggs.gnu.org ([208.118.235.92]:39531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXVdb-0007RJ-6E for qemu-devel@nongnu.org; Wed, 01 May 2013 07:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXVda-0006nZ-18 for qemu-devel@nongnu.org; Wed, 01 May 2013 07:55:54 -0400 Received: from mail-bk0-x22e.google.com ([2a00:1450:4008:c01::22e]:40790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXVdZ-0006nV-JI for qemu-devel@nongnu.org; Wed, 01 May 2013 07:55:53 -0400 Received: by mail-bk0-f46.google.com with SMTP id e19so606055bku.5 for ; Wed, 01 May 2013 04:55:52 -0700 (PDT) Date: Wed, 1 May 2013 13:55:49 +0200 From: Stefan Hajnoczi Message-ID: <20130501115549.GB28932@stefanha-thinkpad.redhat.com> References: <1366734308-11724-1-git-send-email-stefanha@redhat.com> <1366734308-11724-3-git-send-email-stefanha@redhat.com> <517B0690.7080904@redhat.com> <20130429072110.GA13488@stefanha-thinkpad.redhat.com> <517E3CE5.5030202@redhat.com> <517E9713.9010901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <517E9713.9010901@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/3] block: add block_backup QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Ian Main , Stefan Hajnoczi , Paolo Bonzini , dietmar@proxmox.com On Mon, Apr 29, 2013 at 09:51:47AM -0600, Eric Blake wrote: > On 04/29/2013 03:27 AM, Paolo Bonzini wrote: > > Il 29/04/2013 09:21, Stefan Hajnoczi ha scritto: > >>> I'd really love to see us change 'BlockJobInfo' to use an enum for > >>> 'type', instead of its open-coded 'str'. Likewise, the block-job > >>> related events in QMP/qmp-events.txt should be updated to refer to the > >>> enum instead of also being open-coded 'str'. > >> > >> Since the block job QMP API has been in released I'm not sure changing > >> this is worthwhile. QEMU and libvirt would have to maintain > >> compatibility so the code will just be duplicated. > > > > I don't think this would change the actual data on the wire. However, > > it would let libvirt know the supported block job types by introspecting > > the enum. > > Until we have introspection, the point is moot. When we have > introspection, libvirt would much rather see an enum than a 'str'. I > see absolutely no back-compat problem in changing the code to be > type-safe prior to the point that introspection is added. Okay, I haven't looked at how QAPI enums are implemented. If we can move from custom strings to enum without breaking existing libvirt, then great! Stefan