From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfWe0-0003m4-SM for qemu-devel@nongnu.org; Thu, 23 May 2013 10:37:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfWdw-0007pR-3d for qemu-devel@nongnu.org; Thu, 23 May 2013 10:37:28 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:57734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfWdv-0007pL-QH for qemu-devel@nongnu.org; Thu, 23 May 2013 10:37:24 -0400 Received: by mail-we0-f173.google.com with SMTP id p57so2060113wes.18 for ; Thu, 23 May 2013 07:37:23 -0700 (PDT) Date: Thu, 23 May 2013 16:37:20 +0200 From: Stefan Hajnoczi Message-ID: <20130523143720.GU9093@stefanha-thinkpad.redhat.com> References: <1369280289-20928-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369280289-20928-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 00/11] curl: fix curl read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Thu, May 23, 2013 at 11:37:58AM +0800, Fam Zheng wrote: > CURL library API has changed, the current curl driver is not working. > This patch rewrites the use of API as well as the structure of internal > states. > > BDRVCURLState holds the pointer to curl multi interface (man 3 > libcurl-multi), and 4 lists for internal states: > - CURLState holds state for libcurl connection (man 3 libcurl-easy) > - CURLSockInfo holds information for libcurl socket interface (man 3 > curl_multi_socket_action). > - CURLDataCache holds the user data read from libcurl, it is in a list > ordered by access, the used cache is moved to list head on access, so > the tail element is freed first. BDRVCURLState.cache_quota is the > threshold to start freeing cache. > - CURLAIOCB holds ongoing aio information. Looking pretty good. It's not clear to me if block/curl.c was broken, besides failing with HTTP servers that do not support Range:, or which part of this series fixes the bug(s). Can you clarify that in the patch description? I'll test the next revision and audit a little more for memory leaks, since you are introducing several heap-allocated structures and lists.