[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 00/21] qcow2: Support refcount orders != 4
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH 00/21] qcow2: Support refcount orders != 4 |
Date: |
Mon, 10 Nov 2014 14:45:38 +0100 |
This should not need much of a cover letter, but here goes anyway:
As of version 3, the qcow2 file format supports different widths for
refcount entries, ranging from 1 to 64 bit (only powers of two).
Currently, qemu only supports 16 bit, which is the only width supported
by version 2 (compat=0.10) images.
This series adds support to qemu for all other valid refcount orders.
This is mainly done by adding two function pointers into the
BDRVQcowState structure for reading and writing refcount values
independently of the current refcount entry width; all in-memory
refcount arrays (mostly cached refcount blocks) now are void pointers
and are accessed through these functions alone.
Thanks to previous work of making the qemu code agnostic of e.g. the
number of refcount entries per refcount block, the rest is fairly
trivial. The most complex patch in this series is patch 18 which
implements changing the refcount order through qemu-img amend.
To test different refcount widths, simply invoke the qemu-iotests check
program with -o refcount_width=${your_desired_width}. The final test in
this series adds some tests for operations which do not work with
certain refcount orders and for refcount order amendment.
Max Reitz (21):
qcow2: Add two new fields to BDRVQcowState
qcow2: Add refcount_width to format-specific info
qcow2: Use 64 bits for refcount values
qcow2: Respect error in qcow2_alloc_bytes()
qcow2: Refcount overflow and qcow2_alloc_bytes()
qcow2: Helper function for refcount modification
qcow2: Helper for refcount array size calculation
qcow2: More helpers for refcount modification
qcow2: Open images with refcount order != 4
qcow2: refcount_order parameter for qcow2_create2
iotests: Prepare for refcount_width option
qcow2: Allow creation with refcount order != 4
block: Add opaque value to the amend CB
qcow2: Use error_report() in qcow2_amend_options()
qcow2: Use abort() instead of assert(false)
qcow2: Split upgrade/downgrade paths for amend
qcow2: Use intermediate helper CB for amend
qcow2: Add function for refcount order amendment
qcow2: Invoke refcount order amendment function
qcow2: Point to amend function in check
iotests: Add test for different refcount widths
block.c | 4 +-
block/qcow2-cluster.c | 23 +-
block/qcow2-refcount.c | 846 ++++++++++++++++++++++++++++++++++-----
block/qcow2.c | 252 +++++++++---
block/qcow2.h | 24 +-
include/block/block.h | 4 +-
include/block/block_int.h | 4 +-
qapi/block-core.json | 5 +-
qemu-img.c | 5 +-
tests/qemu-iotests/007 | 4 +
tests/qemu-iotests/015 | 1 +
tests/qemu-iotests/026 | 11 +
tests/qemu-iotests/029 | 1 +
tests/qemu-iotests/049.out | 112 +++---
tests/qemu-iotests/051 | 1 +
tests/qemu-iotests/058 | 1 +
tests/qemu-iotests/060.out | 1 +
tests/qemu-iotests/061.out | 14 +-
tests/qemu-iotests/065 | 23 +-
tests/qemu-iotests/067 | 7 +
tests/qemu-iotests/067.out | 10 +-
tests/qemu-iotests/079 | 1 +
tests/qemu-iotests/079.out | 18 +-
tests/qemu-iotests/080 | 1 +
tests/qemu-iotests/082.out | 48 ++-
tests/qemu-iotests/085.out | 38 +-
tests/qemu-iotests/089 | 7 +
tests/qemu-iotests/089.out | 2 +
tests/qemu-iotests/090 | 1 +
tests/qemu-iotests/108 | 6 +
tests/qemu-iotests/112 | 225 +++++++++++
tests/qemu-iotests/112.out | 123 ++++++
tests/qemu-iotests/common.filter | 3 +-
tests/qemu-iotests/group | 1 +
34 files changed, 1546 insertions(+), 281 deletions(-)
create mode 100755 tests/qemu-iotests/112
create mode 100644 tests/qemu-iotests/112.out
--
1.9.3
- [Qemu-devel] [PATCH 00/21] qcow2: Support refcount orders != 4,
Max Reitz <=
- [Qemu-devel] [PATCH 01/21] qcow2: Add two new fields to BDRVQcowState, Max Reitz, 2014/11/10
- [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Max Reitz, 2014/11/10
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Eric Blake, 2014/11/10
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Max Reitz, 2014/11/11
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Kevin Wolf, 2014/11/11
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Max Reitz, 2014/11/11
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Max Reitz, 2014/11/11
- Re: [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values, Kevin Wolf, 2014/11/11
[Qemu-devel] [PATCH 02/21] qcow2: Add refcount_width to format-specific info, Max Reitz, 2014/11/10