Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtJDV-0001Oi-AT for qemu-devel@nongnu.org; Thu, 01 Oct 2009 06:48:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtJDQ-0001LV-Gt for qemu-devel@nongnu.org; Thu, 01 Oct 2009 06:48:56 -0400 Received: from [199.232.76.173] (port=41550 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtJDQ-0001LG-9h for qemu-devel@nongnu.org; Thu, 01 Oct 2009 06:48:52 -0400 Received: from smop.co.uk ([81.5.177.201]:53536 helo=mail.smop.co.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtJDP-0000Qk-Mx for qemu-devel@nongnu.org; Thu, 01 Oct 2009 06:48:52 -0400 Date: Thu, 1 Oct 2009 11:48:43 +0100 From: Adrian Bridgett Subject: Re: [Qemu-devel] qemu-img needs "-O host_device" describing Message-ID: <20091001104842.GA18687@ash.smop.co.uk> References: <20090930212736.GA17077@ash.smop.co.uk> <4AC47CEE.1000405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AC47CEE.1000405@redhat.com> Reply-To: adrian@smop.co.uk List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Thu, Oct 1, 2009 at 11:57:02 +0200 (+0200), Kevin Wolf wrote: > Am 30.09.2009 23:27, schrieb Adrian Bridgett: [snip] > > The long version is that first of all I changed block/raw-posix.c so > > that it didn't try and ftruncat() block devices and then eventually > > tracked down why "kvm-img convert -O raw" fails to block devices (it > > seeks past holes effectively which is good on files, but not block > > devices). > > What is the result of this patch? Will raw instead of host_device work > without an error message for devices? If so, I'm against the change. > It's dangerous: qemu-img would leave zero blocks unchanged instead of > overwriting them with zeros, silently corrupting the converted data. Yep - that's exactly what happens - I was going to send a subsequent one to stop qemu-img convert from skipping past unallocated blocks - but then found the host_device format and that sorted it all out, sorry if that wasn't clear. I do wonder if -O raw should warn when run against output devices which aren't regular files though. > Your documentation fix looks fine. Can you resubmit it in a new > (top-level) mail with [PATCH] in its subject and a Signed-off-by line in > it? Only this way the maintainers will pick it up. Absolutely, thanks for the help :-) Adrian -- bitcube.co.uk - Linux infrastructure consultancy Puppet, Debian, Red Hat, Ubuntu, CentOS, ...