From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb7Xi-0001sb-8T for qemu-devel@nongnu.org; Thu, 15 Dec 2011 04:23:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rb7Xa-0001Jb-L6 for qemu-devel@nongnu.org; Thu, 15 Dec 2011 04:23:58 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:38117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb7Xa-0001Io-FT for qemu-devel@nongnu.org; Thu, 15 Dec 2011 04:23:50 -0500 Received: by mail-ee0-f45.google.com with SMTP id b45so1989823eek.4 for ; Thu, 15 Dec 2011 01:23:50 -0800 (PST) Date: Thu, 15 Dec 2011 08:27:58 +0000 From: Stefan Hajnoczi Message-ID: <20111215082758.GD26425@stefanha-thinkpad.localdomain> References: <1323784351-25531-1-git-send-email-stefanha@linux.vnet.ibm.com> <1323784351-25531-9-git-send-email-stefanha@linux.vnet.ibm.com> <4EE8B8BC.2040804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EE8B8BC.2040804@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 8/9] qmp: add query-block-jobs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Luiz Capitulino , Marcelo Tosatti , Stefan Hajnoczi , qemu-devel@nongnu.org On Wed, Dec 14, 2011 at 03:54:52PM +0100, Kevin Wolf wrote: > Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: > > diff --git a/hmp.c b/hmp.c > > index 66d9d0f..c16d6a1 100644 > > --- a/hmp.c > > +++ b/hmp.c > > @@ -499,6 +499,46 @@ void hmp_info_pci(Monitor *mon) > > qapi_free_PciInfoList(info); > > } > > > > +void hmp_info_block_jobs(Monitor *mon) > > +{ > > + BlockJobInfoList *list; > > + Error *err = NULL; > > + > > + list = qmp_query_block_jobs(&err); > > + assert(!err); > > + > > + if (!list) { > > + monitor_printf(mon, "No active jobs\n"); > > + return; > > + } > > + > > + while (list) { > > + /* The HMP output for streaming jobs is special because historically it > > + * was different from other job types so applications may depend on the > > + * exact string. > > + */ > > Er, what? This is new code. What HMP clients use this string? I know > that libvirt already got support for this before we implemented it, but > shouldn't that be QMP only? Libvirt HMP uses this particular string, which turned out to be sub-optimal once I realized we might support other types of block jobs in the future. You can still build libvirt HMP-only by disabling the yajl library dependency. The approach I've taken is to make the interfaces available over both HMP and QMP (and so has the libvirt-side code). In any case, we have defined both HMP and QMP. Libvirt implements both and I don't think there's a reason to provide only QMP. Luiz: For future features, are we supposed to provide only QMP interfaces, not HMP? Stefan