From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6bXx-0000Ka-AJ for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6bXr-0004UC-AI for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:51:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6bXr-0004U0-2Q for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:51:19 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0O7pHHk021532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 Jan 2014 02:51:17 -0500 Date: Fri, 24 Jan 2014 15:51:15 +0800 From: Fam Zheng Message-ID: <20140124075115.GA12401@T430.nay.redhat.com> References: <1390461052-6840-1-git-send-email-famz@redhat.com> <20140123144232.GF8474@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140123144232.GF8474@dhcp-200-207.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH] vmdk: Fix format specific information (create type) for streamOptimized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com On Thu, 01/23 15:42, Kevin Wolf wrote: > Am 23.01.2014 um 08:10 hat Fam Zheng geschrieben: > > Previously the field is wrong: > > > > $ ./qemu-img create -f vmdk -o subformat=streamOptimized /tmp/a.vmdk 1G > > > > $ ./qemu-img info /tmp/a.vmdk > > image: /tmp/a.vmdk > > file format: vmdk > > virtual size: 1.0G (1073741824 bytes) > > disk size: 12K > > Format specific information: > > cid: 1390460459 > > parent cid: 4294967295 > > >>> create type: monolithicSparse > > > > > > Signed-off-by: Fam Zheng > > Thanks, applied to the block branch. > > By the way, I tried converting a raw image to streamOptimised and got > this: > > qemu-img: Could not write to allocated cluster for streamOptimized > qemu-img: error while writing sector 63: Input/output error > > The problem seems to be that qemu-img tries to be clever and doesn't > write out sparse parts, which breaks up the first cluster into multiple > write requests. Adding -S 64 makes it work. Should we change something > to get a working default? > I think we should make qemu-img even cleverer to not do this with compressed image like this. It was once in my todo list but I forgot to complete it. I'll pick it up. Thanks, Fam