From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdDZa-0002pt-QV for qemu-devel@nongnu.org; Mon, 08 May 2006 17:47:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdDZZ-0002pZ-9I for qemu-devel@nongnu.org; Mon, 08 May 2006 17:47:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdDZZ-0002pW-20 for qemu-devel@nongnu.org; Mon, 08 May 2006 17:47:21 -0400 Received: from [212.27.42.30] (helo=smtp4-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdDaT-0004f5-Py for qemu-devel@nongnu.org; Mon, 08 May 2006 17:48:18 -0400 Received: from [192.168.0.1] (lns-bzn-61-82-250-92-93.adsl.proxad.net [82.250.92.93]) by smtp4-g19.free.fr (Postfix) with ESMTP id BFE84548A0 for ; Mon, 8 May 2006 23:47:19 +0200 (CEST) Subject: Re: [Qemu-devel] Re: qemu disk on vfat From: Yann Le =?ISO-8859-1?Q?Doar=E9?= In-Reply-To: References: <1147082690.5817.23.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 09 May 2006 23:41:01 +0000 Message-Id: <1147218062.9211.2.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org You are right ! : sh-2.05b# qemu-img create /mnt/partitions/windows0/qmeu-disk 4M Formating '/mnt/partitions/windows0/qmeu-disk', fmt=3Draw, size=3D4096 kB sh-2.05b# ls -al /mnt/partitions/windows0/qmeu-disk =20 -rwxr-xr-x 1 root root 0 2006-05-09 23:37 /mnt/partitions/windows0/qmeu-disk sh-2.05b# qemu-img create /mnt/partitions/windows0/qmeu-disk 40M Formating '/mnt/partitions/windows0/qmeu-disk', fmt=3Draw, size=3D40960 k= B sh-2.05b# ls -al /mnt/partitions/windows0/qmeu-disk =20 -rwxr-xr-x 1 root root 0 2006-05-09 23:38 /mnt/partitions/windows0 Le lundi 08 mai 2006 =E0 16:12 -0500, Anthony Liguori a =E9crit : > On Sun, 07 May 2006 08:13:01 +0000, Yann Le Doar=E9 wrote: >=20 > > Hi, > >=20 > > It seems like qemu 0.8.0 does not accept image file from a vfat parti= tion. > > Is it a bug ? > >=20 > > Greetings. > >=20 > > Yann Le Doar=E9. > >=20 > >=20 > > strace : > >=20 > > open("/mnt/partitions/windows0/qmeu-disk", O_RDONLY|O_LARGEFILE) =3D = 7 > > read(7, "", 1024) =3D 0 close(7) = =20 > > =3D 0 open("/mnt/partitions/windows0/qmeu-disk", > > O_RDONLY|O_LARGEFILE) =3D 7 _llseek(7, 128, [128], SEEK_SET) =3D= 0 > > read(7, "", 4) =3D 0 close(7) = =20 > > =3D 0 write(2, "qemu: could not open hard disk i"..., 74qemu= : could > > not open hard disk image '/mnt/partitions/windows0/qmeu-disk' ) =3D 7= 4 > > exit_group(1) =3D ? >=20 > It's pretty clear that what's happening is that qemu opening the file a= nd > the filesystem is claiming it's an empty file. >=20 > So, I recommend you do the following: >=20 > First: >=20 > du -sh /mnt/partitions/windows0/qmeu-disk > ls -al /mnt/partitions/windows0/qmeu-disk >=20 > And make sure both report a non-zero result. If either reports 0 as th= e > size, then you screwed up copying the file to your vfat partition. >=20 > Second: >=20 > In vl.h, change: >=20 > #ifndef O_LARGEFILE > #define O_LARGEFILE 0 > #endif >=20 > To: >=20 > #ifdef O_LARGEFILE > #undef O_LARGEFILE > #endif > #define O_LARGEFILE 0 >=20 > And if that fixes your problem, then vfat is broken when open()'d with > O_LARGEFILE. If that's the case, you should report it as a vfat bug. >=20 > Regards, >=20 > Anthony Liguori >=20 >=20 >=20 > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel