qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] qcow2: Add keep_data_file command-line option
@ 2025-05-30  8:44 Hanna Czenczek
  2025-05-30  8:44 ` [PATCH 1/4] " Hanna Czenczek
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Hanna Czenczek @ 2025-05-30  8:44 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Hanna Czenczek, Kevin Wolf

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(-)

-- 
2.49.0



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

end of thread, other threads:[~2025-11-19 15:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30  8:44 [PATCH 0/4] qcow2: Add keep_data_file command-line option Hanna Czenczek
2025-05-30  8:44 ` [PATCH 1/4] " Hanna Czenczek
2025-06-12 18:54   ` Eric Blake
2025-05-30  8:44 ` [PATCH 2/4] qcow2: Simplify size round-up in co_create_opts Hanna Czenczek
2025-06-12 18:56   ` Eric Blake
2025-05-30  8:44 ` [PATCH 3/4] iotests/common.filter: Sort keep_data_file Hanna Czenczek
2025-06-12 19:09   ` Eric Blake
2025-05-30  8:44 ` [PATCH 4/4] iotests/244: Add test cases for keep_data_file Hanna Czenczek
2025-06-12 19:13   ` Eric Blake
2025-11-19 15:22 ` [PATCH 0/4] qcow2: Add keep_data_file command-line option Hanna Czenczek

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).