From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdH9J-0002uv-Pb for qemu-devel@nongnu.org; Mon, 08 May 2006 21:36:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdH9H-0002rq-LV for qemu-devel@nongnu.org; Mon, 08 May 2006 21:36:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdH9H-0002rb-Ga for qemu-devel@nongnu.org; Mon, 08 May 2006 21:36:27 -0400 Received: from [70.116.9.243] (helo=localhost.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdHAE-0004ND-Lv for qemu-devel@nongnu.org; Mon, 08 May 2006 21:37:26 -0400 Received: from [192.168.1.102] (helo=[192.168.1.102]) by localhost.localdomain with esmtp (Exim 4.52) id 1FdH94-0002lD-N8 for qemu-devel@nongnu.org; Mon, 08 May 2006 20:36:14 -0500 Message-ID: <445FF20F.5070309@codemonkey.ws> Date: Mon, 08 May 2006 20:36:15 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: qemu disk on vfat References: <1147218062.9211.2.camel@localhost> <20060508224846.GA9668@jbrown.mylinuxbox.org> <20060508231032.GA12871@jbrown.mylinuxbox.org> <20060508235024.GA18407@jbrown.mylinuxbox.org> In-Reply-To: <20060508235024.GA18407@jbrown.mylinuxbox.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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 > 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. > > Probably qemu-img should just bail out in this case (as the other disk formats > should work fine and you can always use dd). The 2nd patch I released does > this - the error message just needs to be made more accurate. > >