Skip to content

qcow2: Add keep_data_file command-line option

Hanna Czenczek qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4qcow2: Add keep_data_file command-line optionblock/qcow2.c include/block/block_int-common.h tests/qemu-iotests/082.out+90 -42 replies
2/4qcow2: Simplify size round-up in co_create_optsblock/qcow2.c+1 -21 reply
3/4iotests/common.filter: Sort keep_data_filetests/qemu-iotests/common.filter+1 -11 reply
4/4iotests/244: Add test cases for keep_data_filetests/qemu-iotests/244 tests/qemu-iotests/244.out+124 -02 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] qcow2: Add keep_data_file command-line option

Hi,

This series adds a keep_data_file qemu-img create option to qcow2 that makes it keep the given external data file for a newly created image instead of overwriting it.

This allows to create a qcow2 image for an existing raw image using the qemu-img create command, which previously wasn’t easily possible (besides work-arounds using a temporary data file or qemu-img amend).

(The “proper” way of doing it without this option is to use QMP blockdev-create.)

This new option is a pure qemu-img create (i.e. command-line) option, not available via QMP, because it does not make any sense there. See patch 1 for more explanation.

(See https://issues.redhat.com/browse/RHEL-73509 for perhaps a bit more context.)

Hanna Czenczek (4):
qcow2: Add keep_data_file command-line option
qcow2: Simplify size round-up in co_create_opts
iotests/common.filter: Sort keep_data_file
iotests/244: Add test cases for keep_data_file

 include/block/block_int-common.h |  1 +
 block/qcow2.c                    | 78 +++++++++++++++++++++++++++++---
 tests/qemu-iotests/082.out       | 18 ++++++++
 tests/qemu-iotests/244           | 71 +++++++++++++++++++++++++++++
 tests/qemu-iotests/244.out       | 53 ++++++++++++++++++++++
 tests/qemu-iotests/common.filter |  2 +-
 6 files changed, 216 insertions(+), 7 deletions(-)
Signature · 1 line
2.49.0