From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkTfX-0002R6-Ly for qemu-devel@nongnu.org; Thu, 06 Jun 2013 02:27:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkTfR-0004UY-3M for qemu-devel@nongnu.org; Thu, 06 Jun 2013 02:27:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkTfQ-0004UJ-Rd for qemu-devel@nongnu.org; Thu, 06 Jun 2013 02:27:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r566ROEp025797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Jun 2013 02:27:24 -0400 From: Fam Zheng Date: Thu, 6 Jun 2013 14:25:59 +0800 Message-Id: <1370499959-8916-14-git-send-email-famz@redhat.com> In-Reply-To: <1370499959-8916-1-git-send-email-famz@redhat.com> References: <1370499959-8916-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v7 13/13] curl: change timeout to 30 seconds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, Fam Zheng , rjones@redhat.com, stefanha@redhat.com On curl request timeout, guest gets -EIO. This happens too frequently accessing a slow network resource, with 5 seconds timeout. Change it to 30 seconds to give more time before aborting the request. Reported-by: Richard W.M. Jones Signed-off-by: Fam Zheng --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 50c7188..5d91a05 100644 --- a/block/curl.c +++ b/block/curl.c @@ -332,7 +332,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) goto out; } curl_easy_setopt(state->curl, CURLOPT_URL, s->url); - curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 5); + curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 30); curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb); curl_easy_setopt(state->curl, CURLOPT_WRITEDATA, (void *)state); curl_easy_setopt(state->curl, CURLOPT_PRIVATE, (void *)state); -- 1.8.3