From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6iG0-00037v-05 for qemu-devel@nongnu.org; Fri, 24 Jan 2014 10:01:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6iFs-0004Iu-5n for qemu-devel@nongnu.org; Fri, 24 Jan 2014 10:01:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6iFr-0004IG-T0 for qemu-devel@nongnu.org; Fri, 24 Jan 2014 10:01:12 -0500 Date: Fri, 24 Jan 2014 16:01:03 +0100 From: Kevin Wolf Message-ID: <20140124150103.GJ3342@dhcp-200-207.str.redhat.com> References: <1390571777-19098-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390571777-19098-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block/curl: Implement the libcurl timer callback interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , qemu-devel@nongnu.org, stefanha@redhat.com Am 24.01.2014 um 14:56 hat Paolo Bonzini geschrieben: > From: Peter Maydell > > libcurl versions 7.16.0 and later have a timer callback interface which > must be implemented in order for libcurl to make forward progress (it > will sometimes rely on being called back on the timeout if there are > no file descriptors registered). Implement the callback, and use a > QEMU AIO timer to ensure we prod libcurl again when it asks us to. > > Based on Peter's original patch plus my fix to add curl_multi_timeout_do. > Should compile just fine even on older versions of libcurl. > > I also tried copy-on-read and streaming: > > $ ./qemu-img create -f qcow2 -o \ > backing_file=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso \ > foo.qcow2 1G > $ x86_64-softmmu/qemu-system-x86_64 \ > -drive if=none,file=foo.qcow2,copy-on-read=on,id=cd \ > -device ide-cd,drive=cd --enable-kvm -m 1024 > > Direct http usage is probably too slow, but with copy-on-read ultimately > the image does boot! > > After some time, streaming gets canceled by an EIO, which needs further > investigation. > > Signed-off-by: Peter Maydell > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch. Kevin