On 16.04.25 09:16, Jean-Louis Dupond wrote:
To specify we use measure call for commit size calculations, we add a new 'for_commit' option to the measure call. This will be used in following commit to do a different measurement.
Why not allow specifying the node name (or filename) of the commit target instead of this just being a boolean?
(That was my main problem with the original series, that it wasn’t possible to specify the commit target (in an obvious way at least). I’m not a fan of deferring to JSON parameters for this, although I’m aware that to specify the node name of the commit target you would have to use JSON again, unless qemu-img can do some translation on behalf of the user: Looking at `commit -b`, that takes a filename; it could make sense to have the internal QAPI parameter use a node name, and qemu-img translating the filename parameter into a node name. Actually, `measure` could just accept the same `-b` option as `commit`, which it would then translate into the QAPI `for-commit=<node-name>` option.)
Hanna
Signed-off-by: Jean-Louis Dupond <jean-lo...@dupond.be> --- block/qcow2.c | 16 +++++++++++++ include/block/block_int-common.h | 4 ++++ qapi/block-core.json | 28 ++++++++++++++++++++++ qemu-img.c | 40 ++++++++++++++++++++++++++++---- 4 files changed, 83 insertions(+), 5 deletions(-)