From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra2S8-0006IP-15 for qemu-devel@nongnu.org; Mon, 12 Dec 2011 04:45:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ra2S5-0002V0-S8 for qemu-devel@nongnu.org; Mon, 12 Dec 2011 04:45:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra2S5-0002Uq-LP for qemu-devel@nongnu.org; Mon, 12 Dec 2011 04:45:41 -0500 Message-ID: <4EE5CDFB.1080809@redhat.com> Date: Mon, 12 Dec 2011 10:48:43 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <958CDBC95A3252B592B5E3C9@nimrod.local> <4EE0B059.4010903@redhat.com> <98D05E44527FF395E0A60016@nimrod.local> In-Reply-To: <98D05E44527FF395E0A60016@nimrod.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC: raw device support for block device targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: qemu-devel@nongnu.org Am 11.12.2011 11:45, schrieb Alex Bligh: > > > --On 8 December 2011 13:40:57 +0100 Kevin Wolf wrote: > >>> qemu-img convert appears to support block devices as input, but not >>> as output. That is irritating, as when using qemu-img convert to >>> convert qcow to raw on a block partition, an intermediate file has >>> to be used, which slows things down and pointlessly uses disk space. >>> >>> The problem is that ftruncate() is being called on the output file >>> in order ensure it is sufficiently large, and this fails on >>> block devices. > ... >> >> Creating an image on a block device shouldn't even call raw_create(), >> but only hdev_create(), which doesn't try to truncate the device, but >> just uses lseek to make sure that it's large enough. >> >> Which qemu version are you using and what's your command line? > > I was testing on: > > amb@alex-test:~$ qemu-img --version > qemu-img version 0.12.3, Copyright (c) 2004-2008 Fabrice Bellard That's the problem. It should work since 0.13. Kevin