qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: qemu disk on vfat


From: Yann Le Doaré
Subject: Re: [Qemu-devel] Re: qemu disk on vfat
Date: Tue, 09 May 2006 23:41:01 +0000

You are right ! :

sh-2.05b# qemu-img create /mnt/partitions/windows0/qmeu-disk 4M
Formating '/mnt/partitions/windows0/qmeu-disk', fmt=raw, size=4096 kB
sh-2.05b# ls -al /mnt/partitions/windows0/qmeu-disk            
-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=raw, size=40960 kB
sh-2.05b# ls -al /mnt/partitions/windows0/qmeu-disk             
-rwxr-xr-x    1 root     root            0 2006-05-09
23:38 /mnt/partitions/windows0


Le lundi 08 mai 2006 à 16:12 -0500, Anthony Liguori a écrit :
> On Sun, 07 May 2006 08:13:01 +0000, Yann Le Doaré wrote:
> 
> > Hi,
> > 
> > It seems like qemu 0.8.0 does not accept image file from a vfat partition.
> > Is it a bug ?
> > 
> > Greetings.
> > 
> > Yann Le Doaré.
> > 
> > 
> > strace :
> > 
> > open("/mnt/partitions/windows0/qmeu-disk", O_RDONLY|O_LARGEFILE) = 7
> > read(7, "", 1024)                       = 0 close(7)                      
> >          = 0 open("/mnt/partitions/windows0/qmeu-disk",
> > O_RDONLY|O_LARGEFILE) = 7 _llseek(7, 128, [128], SEEK_SET)        = 0
> > read(7, "", 4)                          = 0 close(7)                      
> >          = 0 write(2, "qemu: could not open hard disk i"..., 74qemu: could
> > not open hard disk image '/mnt/partitions/windows0/qmeu-disk' ) = 74
> > exit_group(1)                           = ?
> 
> It's pretty clear that what's happening is that qemu opening the file and
> the filesystem is claiming it's an empty file.
> 
> So, I recommend you do the following:
> 
> First:
> 
> du -sh /mnt/partitions/windows0/qmeu-disk
> ls -al /mnt/partitions/windows0/qmeu-disk
> 
> And make sure both report a non-zero result.  If either reports 0 as the
> size, then you screwed up copying the file to your vfat partition.
> 
> Second:
> 
> In vl.h, change:
> 
> #ifndef O_LARGEFILE
> #define O_LARGEFILE 0
> #endif
> 
> To:
> 
> #ifdef O_LARGEFILE
> #undef O_LARGEFILE
> #endif
> #define O_LARGEFILE 0
> 
> 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.
> 
> Regards,
> 
> Anthony Liguori
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]