[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option |
Date: |
Tue, 12 Aug 2014 09:36:33 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
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 <address@hidden>
> ---
> 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