From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHEYv-0002KV-0I for qemu-devel@nongnu.org; Tue, 12 Aug 2014 12:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHEYl-0001Qx-46 for qemu-devel@nongnu.org; Tue, 12 Aug 2014 12:04:36 -0400 Received: from e24smtp02.br.ibm.com ([32.104.18.86]:49585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHEYk-0001QZ-Mu for qemu-devel@nongnu.org; Tue, 12 Aug 2014 12:04:27 -0400 Received: from /spool/local by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Aug 2014 13:04:22 -0300 Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.13.184.25]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 4EB0A1DC006A for ; Tue, 12 Aug 2014 12:04:19 -0400 (EDT) Received: from d24av03.br.ibm.com (d24av03.br.ibm.com [9.8.31.95]) by d24relay03.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s7CG3WuT44892256 for ; Tue, 12 Aug 2014 13:03:33 -0300 Received: from d24av03.br.ibm.com (localhost [127.0.0.1]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s7CG4IAE012547 for ; Tue, 12 Aug 2014 13:04:18 -0300 Message-ID: <53EA3B02.4030505@linux.vnet.ibm.com> Date: Tue, 12 Aug 2014 13:04:18 -0300 From: Daniel H Barboza MIME-Version: 1.0 References: <1407854125-25068-1-git-send-email-danielhb@linux.vnet.ibm.com> <53EA3481.2060503@redhat.com> In-Reply-To: <53EA3481.2060503@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Qemu Devel Cc: Kevin Wolf , Stefan Hajnoczi On 08/12/2014 12:36 PM, Eric Blake wrote: > 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 >> --- >> 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". Good catch. I'll fix it in v2. >