[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: qemu disk on vfat
From: |
Jim C. Brown |
Subject: |
Re: [Qemu-devel] Re: qemu disk on vfat |
Date: |
Tue, 16 May 2006 13:21:16 -0400 |
User-agent: |
Mutt/1.4.2.1i |
On Mon, May 08, 2006 at 08:36:15PM -0500, Anthony Liguori wrote:
> Jim C. Brown wrote:
> >Aactually, the bug is in vfat not in qemu-img.
> >
>
> Not really. POSIX doesn't mandate that ftruncate() increase a file
> size. This is a Linux-ism and is only valid for filesystems that
> support holes (which vfat doesn't).
>
> Regards,
>
> Anthony Liguori
>
Ok, so in that case this is something qemu-img should handle on its own then.
(Since we're not likely to see a "fix" in either glibc or the kernel for this,
and it has the potential to be a portability issue.)
On Mon, May 08, 2006 at 07:50:24PM -0400, Jim C. Brown wrote:
> qemu-img correctly uses ftruncate() which is suppose to make the file sparse
> if the underlying filesystem supports it, but it should fall back to adding
> zeros
> to the end of the file. On vfat you aren't able to seek past the end of a file
> period, so this doesn't work.
Turns out I was wrong about this too.
http://www.mail-archive.com/address@hidden/msg00556.html
Here is a patch that silently handles the Linux/vfat case using lseek().
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
block.patch
Description: Text document
- Re: [Qemu-devel] qemu disk on vfat, (continued)
- Re: [Qemu-devel] qemu disk on vfat, Johannes Schindelin, 2006/05/07
- [Qemu-devel] Re: qemu disk on vfat, Anthony Liguori, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Yann Le Doaré, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Michael McConnell, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Jim C. Brown, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Jim C. Brown, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Jim C. Brown, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Anthony Liguori, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat, Paul Brook, 2006/05/08
- Re: [Qemu-devel] Re: qemu disk on vfat,
Jim C. Brown <=
- Re: [Qemu-devel] Re: qemu disk on vfat, Ian C. Blenke, 2006/05/08