All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] block: measure for commit
@ 2026-09-15 14:04 Jean-Louis Dupond
  2026-09-15 14:04 ` [PATCH v2 1/3] block: add bdrv_open_backing_chain_until Jean-Louis Dupond
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jean-Louis Dupond @ 2026-09-15 14:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Pierrick Bouvier, John Snow,
	Vladimir Sementsov-Ogievskiy, Hanna Reitz, Fiona Ebner,
	qemu-block, Jean-Louis Dupond

In some cases we want to calculate the size an image will be after we commit A into B.
This for example on block storage, where you need to resize the target storage before you start the merge.

These commits adds the functionality to do this.
First of all a commit that adds bdrv_open_backing_chain_until. So we can open an image up to base image B.

And then a modified qcow2_measure that calculates the size of B after A has been merged into it.
This with taking into account the discard-no-unref setting of the base.

Jean-Louis Dupond (3):
  block: add bdrv_open_backing_chain_until
  block: support measure for commit
  iotests/290: add test case for qemu-img measure

 block.c                            | 77 +++++++++++++++++++++++-----
 block/crypto.c                     |  1 +
 block/mirror.c                     |  2 +-
 block/qcow2.c                      | 82 ++++++++++++++++++++++++++----
 block/raw-format.c                 |  2 +-
 docs/tools/qemu-img.rst            |  9 +++-
 include/block/block-global-state.h |  7 ++-
 include/block/block-io.h           |  3 +-
 include/block/block_int-common.h   |  2 +-
 qemu-img-cmds.hx                   |  4 +-
 qemu-img.c                         | 45 +++++++++++++---
 tests/qemu-iotests/178.out.qcow2   |  6 +--
 tests/qemu-iotests/178.out.raw     |  6 +--
 tests/qemu-iotests/290             | 45 ++++++++++++++++
 tests/qemu-iotests/290.out         | 61 ++++++++++++++++++++++
 15 files changed, 310 insertions(+), 42 deletions(-)

-- 
2.55.0



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

end of thread, other threads:[~2026-10-30 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 14:04 [PATCH v2 0/3] block: measure for commit Jean-Louis Dupond
2026-09-15 14:04 ` [PATCH v2 1/3] block: add bdrv_open_backing_chain_until Jean-Louis Dupond
2026-10-30 17:25   ` Kevin Wolf
2026-09-15 14:04 ` [PATCH v2 2/3] block: support measure for commit Jean-Louis Dupond
2026-10-30 19:06   ` Kevin Wolf
2026-09-15 14:04 ` [PATCH v2 3/3] iotests/290: add test case for qemu-img measure Jean-Louis Dupond
2026-10-30 19:11   ` Kevin Wolf
2026-10-13 11:10 ` [PATCH v2 0/3] block: measure for commit Jean-Louis Dupond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.