Skip to content

Add subcluster allocation to qcow2

Alberto Garcia qemu-devel 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest34 patches 5 repliesIn review
  2. v1034 patches 7 repliesSuperseded
  3. v934 patches 36 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v834 patches7 repliesSuperseded
v732 patches18 repliesSuperseded
v632 patches2 repliesSuperseded
v531 patches25 repliesSuperseded
v430 patches97 repliesSuperseded
v3 RFC27 patches52 repliesSuperseded
v2 RFC26 patches38 repliesSuperseded
v1 RFC23 patches5 repliesSuperseded

Changes in v11 from the cover letter

- Patch 31: Fix rebase conflicts after df373fb0a3, update test expectations.
- Patch 34: Update test expectations.

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/34qcow2: Make Qcow2AioTask store the full host offsetblock/qcow2.c block/trace-events+34 -370 replies
2/34qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()block/qcow2-cluster.c block/qcow2.c block/qcow2.h+32 -370 replies
3/34qcow2: Add calculate_l2_meta()block/qcow2-cluster.c+53 -240 replies
4/34qcow2: Split cluster_needs_cow() out of count_cow_clusters()block/qcow2-cluster.c+19 -150 replies
5/34qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()block/qcow2-cluster.c+141 -1150 replies
6/34qcow2: Add get_l2_entry() and set_l2_entry()block/qcow2-cluster.c block/qcow2-refcount.c block/qcow2.h+54 -380 replies
7/34qcow2: Document the Extended L2 Entries featuredocs/interop/qcow2.txt docs/qcow2-cache.txt+83 -40 replies
8/34qcow2: Add dummy has_subclusters() functionblock/qcow2.h+6 -00 replies
9/34qcow2: Add subcluster-related fields to BDRVQcow2Stateblock/qcow2.c block/qcow2.h+10 -00 replies
10/34qcow2: Add offset_to_sc_index()block/qcow2.h+5 -00 replies
11/34qcow2: Add offset_into_subcluster() and size_to_subclusters()block/qcow2.h+10 -00 replies
12/34qcow2: Add l2_entry_size()block/qcow2-cluster.c block/qcow2-refcount.c block/qcow2.c +1 more+27 -160 replies
13/34qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()block/qcow2.h+21 -00 replies
14/34qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()block/qcow2.h+125 -10 replies
15/34qcow2: Add qcow2_get_subcluster_range_type()block/qcow2-cluster.c+51 -00 replies
16/34qcow2: Add qcow2_cluster_is_allocated()block/qcow2.h+6 -00 replies
17/34qcow2: Add cluster type parameter to qcow2_get_host_offset()block/qcow2-cluster.c block/qcow2.c block/qcow2.h+31 -200 replies
18/34qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*block/qcow2-cluster.c block/qcow2.c block/qcow2.h+42 -400 replies
19/34qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOCblock/qcow2.c+9 -30 replies
20/34qcow2: Add subcluster support to calculate_l2_meta()block/qcow2-cluster.c+131 -320 replies
21/34qcow2: Add subcluster support to qcow2_get_host_offset()block/qcow2-cluster.c block/qcow2.h+92 -960 replies
22/34qcow2: Add subcluster support to zero_in_l2_slice()block/qcow2-cluster.c+19 -170 replies
23/34qcow2: Add subcluster support to discard_in_l2_slice()block/qcow2-cluster.c+23 -290 replies
24/34qcow2: Add subcluster support to check_refcounts_l2()block/qcow2-refcount.c tests/qemu-iotests/060.out+12 -60 replies
25/34qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()block/qcow2-cluster.c+18 -00 replies
26/34qcow2: Clear the L2 bitmap when allocating a compressed clusterblock/qcow2-cluster.c+3 -00 replies
27/34qcow2: Add subcluster support to handle_alloc_space()block/qcow2.c+5 -40 replies
28/34qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()block/qcow2-cluster.c block/qcow2.c block/qcow2.h+94 -240 replies
29/34qcow2: Add subcluster support to qcow2_measure()block/qcow2.c+13 -70 replies
30/34qcow2: Add prealloc field to QCowL2Metablock/qcow2-cluster.c block/qcow2.c block/qcow2.h+15 -10 replies
31/34qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bitblock/qcow2.c block/qcow2.h include/block/block_int.h +20 more+253 -1401 reply
32/34qcow2: Allow preallocation and backing files if extended_l2 is setblock/qcow2.c tests/qemu-iotests/206.out+5 -40 replies
33/34qcow2: Assert that expand_zero_clusters_in_l1() does not support subclustersblock/qcow2-cluster.c tests/qemu-iotests/061 tests/qemu-iotests/061.out+18 -10 replies
34/34iotests: Add tests for qcow2 images with extended L2 entriestests/qemu-iotests/271 tests/qemu-iotests/271.out tests/qemu-iotests/group+1628 -00 replies

Reviews trailers per patch

All 34 patches have a Reviewed-by or Acked-by.

PatchEric BlakeMax ReitzVladimir Sementsov-Ogievskiy
1/34R-b R-b R-b
2/34R-b
3/34R-b
4/34R-b R-b
5/34R-b R-b
6/34R-b R-b R-b
7/34R-b R-b
8/34R-b R-b R-b
9/34R-b R-b
10/34R-b R-b
11/34R-b R-b
12/34R-b
13/34R-b R-b
14/34R-b R-b
15/34R-b R-b
16/34R-b R-b
17/34R-b R-b
18/34R-b R-b
19/34R-b R-b
20/34R-b R-b
21/34R-b
22/34R-b R-b
23/34R-b R-b
24/34R-b
25/34R-b R-b
26/34R-b
27/34R-b R-b
28/34R-b
29/34R-b
30/34R-b R-b
31/34R-b R-b
32/34R-b R-b
33/34R-b R-b
34/34R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v11 thread

Cover letter [PATCH v11 00/34] Add subcluster allocation to qcow2

Hi,

here's the new version of the patches to add subcluster allocation support to qcow2.

Please refer to the cover letter of the first version for a full description of the patches:

https://lists.gnu.org/archive/html/qemu-block/2019-10/msg00983.html

This version is rebased on top of the latest master (f2a1cf9180), fixes the relevant conflicts (particularly after df373fb0a3) and updates the test expectations.

Berto

v11:
- Patch 31: Fix rebase conflicts after df373fb0a3, update test expectations.
- Patch 34: Update test expectations.

v10: https://lists.gnu.org/archive/html/qemu-block/2020-07/msg00328.html
v9: https://lists.gnu.org/archive/html/qemu-block/2020-06/msg01526.html
v8: https://lists.gnu.org/archive/html/qemu-block/2020-06/msg00546.html
v7: https://lists.gnu.org/archive/html/qemu-block/2020-05/msg01683.html
v6: https://lists.gnu.org/archive/html/qemu-block/2020-05/msg01583.html
v5: https://lists.gnu.org/archive/html/qemu-block/2020-05/msg00251.html
v4: https://lists.gnu.org/archive/html/qemu-block/2020-03/msg00966.html
v3: https://lists.gnu.org/archive/html/qemu-block/2019-12/msg00587.html
v2: https://lists.gnu.org/archive/html/qemu-block/2019-10/msg01642.html
v1: https://lists.gnu.org/archive/html/qemu-block/2019-10/msg00983.html

Output of git backport-diff against v10:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/34:[----] [--] 'qcow2: Make Qcow2AioTask store the full host offset' 002/34:[----] [--] 'qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()' 003/34:[----] [--] 'qcow2: Add calculate_l2_meta()'
004/34:[----] [--] 'qcow2: Split cluster_needs_cow() out of count_cow_clusters()' 005/34:[----] [--] 'qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()' 006/34:[----] [--] 'qcow2: Add get_l2_entry() and set_l2_entry()'
007/34:[----] [--] 'qcow2: Document the Extended L2 Entries feature' 008/34:[----] [--] 'qcow2: Add dummy has_subclusters() function'
009/34:[----] [--] 'qcow2: Add subcluster-related fields to BDRVQcow2State' 010/34:[----] [--] 'qcow2: Add offset_to_sc_index()'
011/34:[----] [--] 'qcow2: Add offset_into_subcluster() and size_to_subclusters()' 012/34:[----] [--] 'qcow2: Add l2_entry_size()'
013/34:[----] [--] 'qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()' 014/34:[----] [--] 'qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()' 015/34:[----] [--] 'qcow2: Add qcow2_get_subcluster_range_type()'
016/34:[----] [--] 'qcow2: Add qcow2_cluster_is_allocated()'
017/34:[----] [--] 'qcow2: Add cluster type parameter to qcow2_get_host_offset()' 018/34:[----] [--] 'qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*' 019/34:[----] [--] 'qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC' 020/34:[----] [--] 'qcow2: Add subcluster support to calculate_l2_meta()' 021/34:[----] [--] 'qcow2: Add subcluster support to qcow2_get_host_offset()' 022/34:[----] [--] 'qcow2: Add subcluster support to zero_in_l2_slice()' 023/34:[----] [--] 'qcow2: Add subcluster support to discard_in_l2_slice()' 024/34:[----] [--] 'qcow2: Add subcluster support to check_refcounts_l2()' 025/34:[----] [--] 'qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()' 026/34:[----] [--] 'qcow2: Clear the L2 bitmap when allocating a compressed cluster' 027/34:[----] [--] 'qcow2: Add subcluster support to handle_alloc_space()' 028/34:[----] [--] 'qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()' 029/34:[----] [--] 'qcow2: Add subcluster support to qcow2_measure()' 030/34:[----] [--] 'qcow2: Add prealloc field to QCowL2Meta'
031/34:[0493] [FC] 'qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit' 032/34:[----] [--] 'qcow2: Allow preallocation and backing files if extended_l2 is set' 033/34:[----] [--] 'qcow2: Assert that expand_zero_clusters_in_l1() does not support subclusters' 034/34:[0006] [FC] 'iotests: Add tests for qcow2 images with extended L2 entries'

Alberto Garcia (34):
qcow2: Make Qcow2AioTask store the full host offset
qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()
qcow2: Add calculate_l2_meta()
qcow2: Split cluster_needs_cow() out of count_cow_clusters()
qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()
qcow2: Add get_l2_entry() and set_l2_entry()
qcow2: Document the Extended L2 Entries feature
qcow2: Add dummy has_subclusters() function
qcow2: Add subcluster-related fields to BDRVQcow2State
qcow2: Add offset_to_sc_index()
qcow2: Add offset_into_subcluster() and size_to_subclusters()
qcow2: Add l2_entry_size()
qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()
qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()
qcow2: Add qcow2_get_subcluster_range_type()
qcow2: Add qcow2_cluster_is_allocated()
qcow2: Add cluster type parameter to qcow2_get_host_offset()
qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*
qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC
qcow2: Add subcluster support to calculate_l2_meta()
qcow2: Add subcluster support to qcow2_get_host_offset()
qcow2: Add subcluster support to zero_in_l2_slice()
qcow2: Add subcluster support to discard_in_l2_slice()
qcow2: Add subcluster support to check_refcounts_l2()
qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()
qcow2: Clear the L2 bitmap when allocating a compressed cluster
qcow2: Add subcluster support to handle_alloc_space()
qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()
qcow2: Add subcluster support to qcow2_measure()
qcow2: Add prealloc field to QCowL2Meta
qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit
qcow2: Allow preallocation and backing files if extended_l2 is set
qcow2: Assert that expand_zero_clusters_in_l1() does not support
subclusters
iotests: Add tests for qcow2 images with extended L2 entries

 docs/interop/qcow2.txt           |  68 ++-
 docs/qcow2-cache.txt             |  19 +-
 qapi/block-core.json             |   7 +
 block/qcow2.h                    | 211 ++++++-
 include/block/block_int.h        |   1 +
 block/qcow2-cluster.c            | 912 +++++++++++++++++++++----------
 block/qcow2-refcount.c           |  47 +-
 block/qcow2.c                    | 302 ++++++----
 block/trace-events               |   2 +-
 tests/qemu-iotests/031.out       |   8 +-
 tests/qemu-iotests/036.out       |   4 +-
 tests/qemu-iotests/049.out       | 102 ++--
 tests/qemu-iotests/060.out       |   3 +-
 tests/qemu-iotests/061           |   6 +
 tests/qemu-iotests/061.out       |  25 +-
 tests/qemu-iotests/065           |  12 +-
 tests/qemu-iotests/082.out       |  39 +-
 tests/qemu-iotests/085.out       |  38 +-
 tests/qemu-iotests/144.out       |   4 +-
 tests/qemu-iotests/182.out       |   2 +-
 tests/qemu-iotests/185.out       |   8 +-
 tests/qemu-iotests/198           |   2 +
 tests/qemu-iotests/206.out       |   6 +-
 tests/qemu-iotests/242.out       |   5 +
 tests/qemu-iotests/255.out       |   8 +-
 tests/qemu-iotests/271           | 901 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/271.out       | 726 ++++++++++++++++++++++++
 tests/qemu-iotests/274.out       |  49 +-
 tests/qemu-iotests/280.out       |   2 +-
 tests/qemu-iotests/291.out       |   2 +
 tests/qemu-iotests/common.filter |   1 +
 tests/qemu-iotests/group         |   1 +
 32 files changed, 2950 insertions(+), 573 deletions(-)
 create mode 100755 tests/qemu-iotests/271
 create mode 100644 tests/qemu-iotests/271.out
Signature · 1 line
2.20.1