From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1hPE-000850-7S for qemu-devel@nongnu.org; Wed, 06 May 2009 09:43:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1hP9-00082Q-JH for qemu-devel@nongnu.org; Wed, 06 May 2009 09:43:27 -0400 Received: from [199.232.76.173] (port=55862 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1hP9-00082I-8f for qemu-devel@nongnu.org; Wed, 06 May 2009 09:43:23 -0400 Received: from mail-qy0-f111.google.com ([209.85.221.111]:33666) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1hP8-00074G-T3 for qemu-devel@nongnu.org; Wed, 06 May 2009 09:43:23 -0400 Received: by qyk9 with SMTP id 9so193951qyk.4 for ; Wed, 06 May 2009 06:43:22 -0700 (PDT) Message-ID: <4A0193F7.1020205@codemonkey.ws> Date: Wed, 06 May 2009 08:43:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add HTTP protocol using curl v2 References: <1241571650-16212-1-git-send-email-alex@csgraf.de> <20090506082810.GB23167@redhat.com> <4A0154E9.7020705@redhat.com> <20090506093143.GC23167@redhat.com> <4A015F06.7050102@redhat.com> <4A018CD8.6000200@codemonkey.ws> <20090506133920.GK23167@redhat.com> In-Reply-To: <20090506133920.GK23167@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Kevin Wolf , alex@csgraf.de, nolan@sigbus.net, Avi Kivity , qemu-devel@nongnu.org Daniel P. Berrange wrote: > On Wed, May 06, 2009 at 08:12:56AM -0500, Anthony Liguori wrote: > >> Avi Kivity wrote: >> >>> Daniel P. Berrange wrote: >>> >>>> Then I'd prefer we add a protocol=XXX option for magic protocols. >>>> This would be easier to use & clearer than requiring escaping of >>>> magic characters, eg >>>> >>>> -drive file=/some/path:with:colons,protocol=file >>>> -drive file=http://some/path,protocol=uri >>>> >>>> For compatability, we could make it such that if protocol=XXX was >>>> left out, >>>> it could try and "guess" it, in same way QEMU does if format=XXX is >>>> left out >>>> for content format. >>>> >>>> >>> How about >>> >>> -drive file=file:///some/path:with:colons? >>> >>> Libvirt would use this unconditionally, command-line users can choose. >>> >> Why does libvirt care? That confuses me. >> > > I don't have any problem with QEMU supporting http, nbd, or other clever > file access schemes. I'll let others debate its merits vs using FUSE > http filesystems :-) > > All I care about from libvirt POV, is that there is a way to give QEMU an > absolute file path for a disk, and guarentee that QEMU will treat this as > a local file path, and not try any access protocols, other than 'open(2)'. > Various options from this thread.... > > - Treat any path starting with / as local file > - Allow file: as a prefix > - Allow file:/// as a prefix, real URI style > - Add a protocol=file flag to -drive > The only viable solution is for libvirt to escape it's file names. For instance, you're in all sorts of trouble if a user creates a filename that looks like 'My disk image,format=raw.img' Regards, Anthony Liguori