From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugw3U-0006YK-7r for qemu-devel@nongnu.org; Mon, 27 May 2013 07:57:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ugw3J-0003X6-MW for qemu-devel@nongnu.org; Mon, 27 May 2013 07:57:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugw3J-0003Ws-ER for qemu-devel@nongnu.org; Mon, 27 May 2013 07:57:25 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4RBvOLW015295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 May 2013 07:57:24 -0400 Date: Mon, 27 May 2013 12:57:20 +0100 From: "Richard W.M. Jones" Message-ID: <20130527115720.GW4515@redhat.com> References: <1369373827-9152-1-git-send-email-famz@redhat.com> <20130524080748.GI4515@redhat.com> <20130527022521.GA27700@localhost.nay.redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EDJsL2R9iCFAt7IV" Content-Disposition: inline In-Reply-To: <20130527022521.GA27700@localhost.nay.redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 00/12] curl: fix curl read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, stefanha@redhat.com, kwolf@redhat.com, jcody@redhat.com --EDJsL2R9iCFAt7IV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 27, 2013 at 10:25:21AM +0800, Fam Zheng wrote: > On Fri, 05/24 09:07, Richard W.M. Jones wrote: > > On Fri, May 24, 2013 at 01:36:55PM +0800, Fam Zheng wrote: > > > Changes from v5: > > > 05: Rename bs to s for BDRVCURLState. > > > 06: Use int64_t for offsets. > > > Fix printf format string. > > > Move introducing of use_count to 07. > > > 07: Drop explicit cast. > > > Use int64_t for offsets. > > > Use_count moved here. > > > 08: Remove duplicated. > > > Move s->url =3D NULL to separate patch. > > > 09: Fix while(0); > > > 12: Added: > > > curl: set s->url to NULL after free. > >=20 > > This patch is definitely not working. The guest sees loads of > > disk errors like this: > >=20 > > [ 30.880265] sd 2:0:0:0: [sda] =20 > > [ 30.880265] Add. Sense: I/O process terminated > > [ 30.880265] sd 2:0:0:0: [sda] CDB:=20 > > [ 30.880265] Read(10): 28 00 00 bf b0 87 00 00 01 00 > > [ 32.030702] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Result: hostbyte=3DDID_OK driverbyte=3DDRIVER_SENSE > > [ 32.031663] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Sense Key : Aborted Command [current]=20 > > [ 32.031663] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Add. Sense: I/O process terminated > > [ 32.031663] sd 2:0:0:0: [sda] CDB:=20 > > [ 32.031663] Read(10): 28 00 00 00 08 46 00 00 01 00 > > [ 32.031663] blk_update_request: 32 callbacks suppressed > > [ 32.031663] end_request: I/O error, dev sda, sector 2118 > > [ 32.031663] quiet_error: 46 callbacks suppressed > > [ 32.031663] Buffer I/O error on device sda1, logical block 2055 > > [ 32.031663] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Result: hostbyte=3DDID_OK driverbyte=3DDRIVER_SENSE > > [ 32.031663] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Sense Key : Aborted Command [current]=20 > > [ 32.031663] sd 2:0:0:0: [sda] =20 > > [ 32.031663] Add. Sense: I/O process terminated > > [ 32.031663] sd 2:0:0:0: [sda] CDB:=20 > > [ 32.031663] Read(10): 28 00 00 00 08 45 00 00 01 00 > > [ 32.031663] end_request: I/O error, dev sda, sector 2117 > > [ 32.031663] Buffer I/O error on device sda1, logical block 2054 > > [ 32.031663] sd 2:0:0:0: [sda] =20 > >=20 >=20 > Rich, are you testing with libguestfs or qemu? Since I can't get > libguestfs run with your patch to refuse writable open. You need to add the --ro option and make sure LIBGUESTFS_BACKEND=3Ddirect. > Can you post your command? Sure, I'm using the attached test script. Rich. --=20 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjon= es Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) --EDJsL2R9iCFAt7IV Content-Type: application/x-sh Content-Disposition: attachment; filename="test.sh" Content-Transfer-Encoding: quoted-printable #!/bin/bash -=0A=0A# Enable core dumps.=0Aulimit -c unlimited=0A=0A# Locati= on of self-compiled Curl (from git):=0Aexport LD_LIBRARY_PATH=3D~/d/curl/li= b/.libs=0A=0A# Location of self-compiled qemu (from git):=0Aexport LIBGUEST= FS_QEMU=3D~/d/qemu/qemu.wrapper=0Aexport PATH=3D~/d/qemu:$PATH=0A=0A# Set u= p libguestfs to run qemu directly instead of using libvirt:=0Aexport LIBGUE= STFS_BACKEND=3Ddirect=0A=0A# Enable libguestfs debugging (optional):=0Aexpo= rt LIBGUESTFS_DEBUG=3D1=0Aexport LIBGUESTFS_TRACE=3D1=0A=0A# Location of re= mote disk image over http:=0Adisk=3D"http://192.168.0.249/scratch/winxp.img= "=0Aformat=3D"raw"=0A=0A# Location of libguestfs directory (compiled from g= it):=0Acd ~/d/libguestfs=0A=0A# Run guestfish script.=0A./run ./fish/guestf= ish --ro --format=3D"$format" -a "$disk" -i <