diff mbox

[v6,00/12] curl: fix curl read

Message ID 20130528112539.GH4515@redhat.com
State New
Headers show

Commit Message

Richard W.M. Jones May 28, 2013, 11:25 a.m. UTC
[I chopped the CC list down]

On Tue, May 28, 2013 at 07:14:01PM +0800, Fam Zheng wrote:
> There seems no easy way to me to inject sleep to io reqs in curl.c.
> Another option might be configure & compile qemu with
> CFLAGS=-DDEBUG_CURL and grab the stdout, so that we can see how requests
> are processed.

No problems.

I started with v6 patch.  I did:

$ CFLAGS=-DDEBUG_CURL ./configure --enable-werror --target-list="i386-softmmu x86_64-softmmu"
$ make

Note there is a bug!

block/curl.c: In function ‘curl_complete_io’:
block/curl.c:211:5: error: too many arguments for format [-Werror=format-extra-args]
cc1: all warnings being treated as errors
make: *** [block/curl.o] Error 1

Please add the attached patch to your patch set.

After fixing that and continuing the build, I then ran:

$ /tmp/test.sh >& /tmp/curl-debug.log

This shows the error and produces an absolutely vast amount of
debugging (attached).  Note that I killed it after a while but there
should be enough to show the error.

Rich.
diff mbox

Patch

diff --git a/block/curl.c b/block/curl.c
index 50c7188..3e330b6 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -208,7 +208,7 @@  static void curl_complete_io(BDRVCURLState *bs, CURLAIOCB *acb,
 
     qemu_iovec_from_buf(acb->qiov, 0, cache->data + off, aio_bytes);
     acb->common.cb(acb->common.opaque, 0);
-    DPRINTF("AIO Request OK: " PRId64 "%10zd\n", aio_base, aio_bytes);
+    DPRINTF("AIO Request OK: %" PRId64 "%10zd\n", aio_base, aio_bytes);
     qemu_aio_release(acb);
     acb = NULL;
     /* Move cache next in the list */