From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFM7q-0001Oz-K5 for qemu-devel@nongnu.org; Tue, 12 Mar 2013 06:08:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFM7i-0005lE-VT for qemu-devel@nongnu.org; Tue, 12 Mar 2013 06:08:06 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:37176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFM7i-0005kz-Oh for qemu-devel@nongnu.org; Tue, 12 Mar 2013 06:07:58 -0400 Received: by mail-wi0-f171.google.com with SMTP id hn17so1658247wib.4 for ; Tue, 12 Mar 2013 03:07:57 -0700 (PDT) Date: Tue, 12 Mar 2013 11:07:54 +0100 From: Stefan Hajnoczi Message-ID: <20130312100754.GC19624@stefanha-thinkpad.redhat.com> References: <1363000996-13221-1-git-send-email-xiawenc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1363000996-13221-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com On Mon, Mar 11, 2013 at 07:23:02PM +0800, Wenchao Xia wrote: > In the use of snapshot a way to retrieve related info at runtime is needed, > so this serial of patches will merge some code for qemu and qemu-img, and add > following interfaces for qemu: > > 1) qmp: query-images, show image info for a block device > Example: > -> { "execute": "query-images" } > <- { > "return":[ > { > "device":"ide0-hd0", > "image":{ > "filename":"disks/test1.img", > "format":"qcow2", > "virtual-size":2048000, > "snapshots":[ > { > "id": "1", > "name": "snapshot1", > "vm-state-size": 0, > "date-sec": 10000200, > "date-nsec": 12, > "vm-clock-sec": 206, > "vm-clock-nsec": 30 > } > ] > } > } > ] > } See my recent RFC patch to add a virtual_size to query-block: http://permalink.gmane.org/gmane.comp.emulators.qemu/199443 Is there a reason you added the new query-images command instead of extending BlockDeviceInfo with an ImageInfo field? Then query-block, which is already used today, just provides ImageInfo as well. I suggest this because it makes life easier for clients - they can issue a single command to extract all image information. If we have two commands they may have to invoke both and then match the results together. Stefan