On 08/12/2014 08:35 AM, Daniel Henrique Barboza wrote: > The curl hardcoded timeout (5 seconds) sometimes is not long > enough depending on the remote server configuration and network > traffic. The user should be able to set how much long he is > willing to wait for the connection. > > Adding a new option to set this timeout gives the user this > flexibility. The previous default timeout of 5 seconds will be > used if this option is not present. > > Signed-off-by: Daniel Henrique Barboza <danie...@linux.vnet.ibm.com> > --- > block/curl.c | 13 ++++++++++++- > qemu-options.hx | 10 ++++++++-- > 2 files changed, 20 insertions(+), 3 deletions(-)
It would be really nice if we could get curl support added to BlockdevOptionsBase, so that the QMP command for hot-plugging a curl drive could also control this option. (Hmm, I wonder why curl is omitted from the list of TODOs in qapi/block-core.json under BlockdevOptionsBase). > @example > -qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"https",, > "file.url":"https://user:password@@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&dsName=datastore1",, > "file.sslverify":"off",, "file.readahead":"64k"@}' /tmp/test.qcow2 > +qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"https",, > "file.url":"https://user:password@@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&dsName=datastore1",, > "file.sslverify":"off",, "file.readahead":"64k",, "file.curltimeout":"10"@}' Since you are parsing curltimeout as a QEMU_OPT_NUMBER, it should be "file.curltimeout":10, not "file.curltimeout":"10". -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature