From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45181 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhUa9-0002T8-Ho for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:08:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhUa7-0001rD-Rb for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:08:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhUa7-0001qe-Ko for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:08:15 -0500 Date: Mon, 24 Jan 2011 22:08:09 +0000 From: "Richard W.M. Jones" Subject: Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC Message-ID: <20110124220809.GA4254@amd.home.annexia.org> References: <1295270117-24760-1-git-send-email-mdroth@linux.vnet.ibm.com> <1295270117-24760-9-git-send-email-mdroth@linux.vnet.ibm.com> <4D39B716.1010400@redhat.com> <20110121172026.GK12589@redhat.com> <4D39CF2C.1000407@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D39CF2C.1000407@linux.vnet.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, Jes Sorensen , marcel.mittelstaedt@de.ibm.com, qemu-devel@nongnu.org, abeekhof@redhat.com, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, markus_mueller@de.ibm.com On Fri, Jan 21, 2011 at 12:23:40PM -0600, Michael Roth wrote: > getfile() is confusingly named however, it's really just a means to > peek at a text file like /proc/meminfo. You might as well reuse the libguestfs API here because you get the benefit of all the code that's been written, all the tools on top, and a far more comprehensive API that would take you another 2 years to implement. There's various ways to do it: Encapsulate the libguestfs API messages to and from guestfsd into the virtagent protocol. Or give us another 8-bit-clean channel. Or write a libguestfs generator component that generates virtagent messages. We got a long way through porting guestfsd to Windows last year when we thought we needed a Windows-native daemon (since abandoned for other reasons). It works already for many of the API calls. > general file access will be done via a stateful interface that > implements similar semantics to open()/read()/write()/close(). This will be very slow. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora