Skip to content

block/qcow2: Image file option amendment

Max Reitz qemu-devel 5 versions – Applied

Status from this message: Thanks, applied to the block branch with the following changes:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 2 repliesApplied
  2. v45 patches 5 repliesSuperseded
  3. v33 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches5 repliesSuperseded
v13 patches12 repliesSuperseded

Changes in v5 from the cover letter

- added a new function for emptying a cache (patch 2)
- fixed rounding for the bitmap size in qcow2_expand_zero_clusters
- now empties the cache in qcow2_expand_zero_clusters instead of simply flushing it
- factored out assignment check in qcow2_amend_options
- fixed resizing by moving it to the end of qcow2_amend_options
- fixed expected test result for resizing in addition to a version upgrade

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/6block: Image file option amendmentblock.c include/block/block.h include/block/block_int.h +3 more+108 -00 replies
2/6qcow2-cache: Empty cacheblock/qcow2-cache.c block/qcow2.h+20 -00 replies
3/6qcow2-cluster: Expand zero clustersblock/qcow2-cluster.c block/qcow2-refcount.c block/qcow2.h+253 -140 replies
4/6qcow2: Save refcount order in BDRVQcowStateblock/qcow2.c block/qcow2.h+3 -10 replies
5/6qcow2: Implement bdrv_amend_optionsblock/qcow2.c+194 -00 replies
6/6qemu-iotest: qcow2 image option amendmenttests/qemu-iotests/061 tests/qemu-iotests/061.out tests/qemu-iotests/group+528 -00 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKevin Wolf
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v5 thread

Cover letter [Qemu-devel] [PATCH v5 0/6] block/qcow2: Image file option amendment

This series adds support to qemu-img, block and qcow2 for amending image options on existing image files.

Depends on:
- option: Add assigned flag to QEMUOptionParameter
- qcow2-refcount: Snapshot update for zero clusters (series, v3)
- Add metadata overlap checks (series, v5)

v5:
- added a new function for emptying a cache (patch 2)
- fixed rounding for the bitmap size in qcow2_expand_zero_clusters
- now empties the cache in qcow2_expand_zero_clusters instead of simply flushing it
- factored out assignment check in qcow2_amend_options
- fixed resizing by moving it to the end of qcow2_amend_options
- fixed expected test result for resizing in addition to a version upgrade

v4:
- rebased on the metadata overlap check series (and fit to it)
- split patch 2 into three distinct patches (2, 3 and 4)
- extended test for zero expansion on backed and inactive backed clusters (and fixed according to the metadata overlap check series (i.e., adjusted header length))
- fixed zero expansion with shared L2 tables

v3:
- deallocate non-preallocated zero clusters on non-backed images instead of zero expanding them
- qcow2 version downgrade: error out on refcount_order != 4
- implemented Eric's comments regarding the qemu-img amend and img_amend itself

v2:
- Generally implemented Kevin's comments, especially:
- Zero cluster expansion for inactive L2 tables
- Correct handling of preallocated zero clusters
- More test cases

Max Reitz (6):
block: Image file option amendment
qcow2-cache: Empty cache
qcow2-cluster: Expand zero clusters
qcow2: Save refcount order in BDRVQcowState
qcow2: Implement bdrv_amend_options
qemu-iotest: qcow2 image option amendment

 block.c                    |   8 ++
 block/qcow2-cache.c        |  18 +++
 block/qcow2-cluster.c      | 233 ++++++++++++++++++++++++++++++
 block/qcow2-refcount.c     |  29 ++--
 block/qcow2.c              | 197 ++++++++++++++++++++++++-
 block/qcow2.h              |   8 ++
 include/block/block.h      |   2 +
 include/block/block_int.h  |   3 +
 qemu-img-cmds.hx           |   6 +
 qemu-img.c                 |  84 +++++++++++
 qemu-img.texi              |   5 +
 tests/qemu-iotests/061     | 178 +++++++++++++++++++++++
 tests/qemu-iotests/061.out | 349 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/group   |   1 +
 14 files changed, 1106 insertions(+), 15 deletions(-)
 create mode 100755 tests/qemu-iotests/061
 create mode 100644 tests/qemu-iotests/061.out
Signature · 1 line
1.8.3.1