|
From: | Alex Bligh |
Subject: | Re: [Qemu-devel] RFC: raw device support for block device targets |
Date: | Sun, 11 Dec 2011 10:45:06 +0000 |
--On 8 December 2011 13:40:57 +0100 Kevin Wolf <address@hidden> 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: address@hidden:~$ qemu-img --version qemu-img version 0.12.3, Copyright (c) 2004-2008 Fabrice Bellard though the patch was against current trunk. Command line simply: qemu-img convert -O raw test.qcow /dev/xyz Fails on ftruncate() as verified with strace. I must admit I only 'tested' on trunk by reading the source. -- Alex Bligh
[Prev in Thread] | Current Thread | [Next in Thread] |