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.
