On 05/01/2014 02:56 AM, Matthew Booth wrote: > On 30/04/14 16:16, Kevin Wolf wrote: >> Am 30.04.2014 um 16:20 hat Matthew Booth geschrieben: >>> curl_parse_filename wasn't removing the option string from the url, >>> resulting in a 404. >>>
> > Alternatively I could completely change the syntax. However, the only > 'safe' syntax I can think of would involve ugly custom escaping, which > would probably catch out more people than unsafe option parsing. I'm > open to suggestions. The name is a URI, so it should already be possible to use URI escaping (percent-hex-hex) for any character that must be interpreted as part of the filename rather than as a bogus query. Therefore, you should be strict and require that the user passes in a valid URI with all options known and with the filename spelled correctly using URI escapes, rather than loose and parsing what would otherwise be garbage as a possible weird filename. > > On a related note, do you know if it's possible to specify a backing > file with separated options? i.e.: > > qemu-img create -f qcow2 -o > backingfile.url='http://example.com/path',backingfile.readahead='64k' > /tmp/foo.qcow2 It should be possible; in fact, if the backing file is supported in BlockdevOptions for the QMP blockdev-add command it already is. If it is not supported in BlockdevOptions, then we need structured options added to make it possible. But you can use any of the backing stores that are already structured as your example. > > I suspect that qcow2 only stores a string, so probably not, but I > thought I'd ask. There's a proposal for a new json: protocol, which allows storing ANY arbitrary BlockdevOptions as a flat string in the qcow2 metadata (within the limits of the header format which forces you to 1024 bytes or less). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature