qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] Fix conversion from ISO to VMDK streamOptimized
@ 2013-11-13  0:53 Fam Zheng
  2013-11-13  0:53 ` [Qemu-devel] [PATCH 1/5] qemu-img: Convert by cluster size if target is compressed Fam Zheng
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Fam Zheng @ 2013-11-13  0:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, gentoo.integer, stefanha

Previouly, "qemu-img 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, which write by cluster size. In VMDK
streamOptimized, writes must be in cluster unit, because overlapped write to
an allocated cluster is not supported.

This series adds an is_compressed field in BlockDriverInfo, and use compressed
convertion loop if the block driver set this field to true.

Implement .bdrv_get_info and .bdrv_write_compressed in VMDK driver to fit into
this framework.

Fam Zheng (5):
  qemu-img: Convert by cluster size if target is compressed
  vmdk: Implement .bdrv_write_compressed
  block: Change BlockDriverInfo.cluster_size to 64 bits
  vmdk: Implement .bdrv_get_info()
  mirror: Check for bdrv_get_info result

 block/mirror.c             |  4 ++--
 block/vmdk.c               | 33 +++++++++++++++++++++++++++++++++
 include/block/block.h      |  3 ++-
 qemu-img.c                 |  8 ++++++--
 tests/qemu-iotests/059.out |  1 +
 5 files changed, 44 insertions(+), 5 deletions(-)

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-11-14  1:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13  0:53 [Qemu-devel] [PATCH 0/5] Fix conversion from ISO to VMDK streamOptimized Fam Zheng
2013-11-13  0:53 ` [Qemu-devel] [PATCH 1/5] qemu-img: Convert by cluster size if target is compressed Fam Zheng
2013-11-13 15:23   ` Jeff Cody
2013-11-14  1:18     ` Fam Zheng
2013-11-14  1:34       ` Jeff Cody
2013-11-14  1:49         ` Fam Zheng
2013-11-13  0:53 ` [Qemu-devel] [PATCH 2/5] vmdk: Implement .bdrv_write_compressed Fam Zheng
2013-11-13  0:53 ` [Qemu-devel] [PATCH 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits Fam Zheng
2013-11-13  0:53 ` [Qemu-devel] [PATCH 4/5] vmdk: Implement .bdrv_get_info() Fam Zheng
2013-11-13  0:53 ` [Qemu-devel] [PATCH 5/5] mirror: Check for bdrv_get_info result Fam Zheng
2013-11-13 15:34   ` Jeff Cody
2013-11-14  1:26     ` Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).