Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
qemu-linux-user.11147
0059-qemu-img-Convert-by-cluster-size-if.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0059-qemu-img-Convert-by-cluster-size-if.patch of Package qemu-linux-user.11147
From 96c5fc0fab328e1f21bd62ddd9415fbf698149ca Mon Sep 17 00:00:00 2001 From: Fam Zheng <famz@redhat.com> Date: Tue, 6 May 2014 21:08:43 +0800 Subject: [PATCH] qemu-img: Convert by cluster size if target is compressed If target block driver forces compression, qemu-img convert needs to write by cluster size as well as "-c" option. Particularly, this applies for converting to VMDK streamOptimized format. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> (cherry picked from commit 85f49cad879adfb5c3cbdc47ca3c3b50eb8f40bc) [BR: FATE#317741] Signed-off-by: Bruce Rogers <brogers@suse.com> --- include/block/block.h | 4 ++++ qemu-img.c | 1 + 2 files changed, 5 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index b3230a25f6..494a7459d6 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -34,6 +34,10 @@ typedef struct BlockDriverInfo { * opened with BDRV_O_UNMAP flag for this to work. */ bool can_write_zeroes_with_unmap; + /* + * True if this block driver only supports compressed writes + */ + bool needs_compressed_writes; } BlockDriverInfo; typedef struct BlockFragInfo { diff --git a/qemu-img.c b/qemu-img.c index c594edf3e9..26700e3e86 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1464,6 +1464,7 @@ static int img_convert(int argc, char **argv) goto out; } } else { + compress = compress || bdi.needs_compressed_writes; cluster_sectors = bdi.cluster_size / BDRV_SECTOR_SIZE; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor