From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whf32-00080w-Pg for qemu-devel@nongnu.org; Tue, 06 May 2014 09:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Whf2n-0005do-RJ for qemu-devel@nongnu.org; Tue, 06 May 2014 09:04:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whf2n-0005dP-H1 for qemu-devel@nongnu.org; Tue, 06 May 2014 09:04:25 -0400 Date: Tue, 6 May 2014 21:04:33 +0800 From: Fam Zheng Message-ID: <20140506130433.GF1574@T430.nay.redhat.com> References: <1398412852-2562-1-git-send-email-famz@redhat.com> <20140506125223.GJ15810@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140506125223.GJ15810@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 0/4] Fix conversion from ISO to VMDK streamOptimized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, gentoo.integer@gmail.com, qemu-devel@nongnu.org On Tue, 05/06 14:52, Stefan Hajnoczi wrote: > On Fri, Apr 25, 2014 at 04:00:48PM +0800, Fam Zheng wrote: > > Previouly, convert from ISO to VMDK with subformat=streamOptimized fails: > > > > $ ./qemu-img convert -O vmdk -o subformat=streamOptimized foo.iso bar.vmdk > > VMDK: can't write to allocated cluster for streamOptimized > > qemu-img: error while writing sector 64: Input/output error > > > > Because current code in qemu-img.c uses the normal convert loop, rather than > > the compressed == true loop. In VMDK streamOptimized, writes must be in cluster > > granularity, because overlapped write to an allocated cluster is -EIO. > > > > This series adds is_compressed into BlockDriverInfo, and uses compressed > > convertion loop if the target block driver sets this field to true. > > > > It also implements .bdrv_get_info and .bdrv_write_compressed in VMDK driver to > > fit into this framework. > > > > Adds a test case to cover the code path in question: source image cluster size > > is smaller. > > > > v3: Finally revisit and address Stefan's review comments on v2 from 2 months > > ago. Sorry for being so slow on this one. > > The general approach is the same, changes include: > > > > - Split originial "[PATCH v2 5/5] mirror: Check for bdrv_get_info result" and > > send to list separately, because it's irrelevant with this series. > > - Don't report cluster_size in bdrv_get_info if it's a flat extent, no need > > to change type of BlockDriverInfo.cluster_size to 64 bits. So drop > > "[PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits". > > - Add qemu-iotests case as [PATCH 4/4]. > > > > > > Fam Zheng (4): > > qemu-img: Convert by cluster size if target is compressed > > vmdk: Implement .bdrv_write_compressed > > vmdk: Implement .bdrv_get_info() > > qemu-iotests: Test converting to streamOptimized from small cluster > > size > > > > block/vmdk.c | 35 +++++++++++++++++++++++++++++++++++ > > include/block/block.h | 4 ++++ > > qemu-img.c | 1 + > > tests/qemu-iotests/059 | 7 +++++++ > > tests/qemu-iotests/059.out | 8 ++++++++ > > 5 files changed, 55 insertions(+) > > Looks good. I left a comment on Patch 1 asking you to rename the flag. > Thanks, will respin and send another revision soon. Fam