Skip to content

qcow2 zero-cluster tweaks [was add blkdebug tests]

Eric Blake qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to my block branch with patch 5 extended as proposed

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v13 Latest12 patches 10 repliesApplied
  2. v1210 patches 17 repliesSuperseded

Patches in v13 Applied

#Subject and filesSizeRepliesApplied
1/12qcow2: Nicer variable names in qcow2_update_snapshot_refcount()block/qcow2-refcount.c+22 -203 replies
2/12qcow2: Use consistent switch indentationblock/qcow2-cluster.c block/qcow2-refcount.c+58 -580 replies
3/12block: Update comments on BDRV_BLOCK_* meaningsinclude/block/block.h include/block/block_int.h+26 -160 replies
4/12qcow2: Correctly report status of preallocated zero clustersblock/qcow2-cluster.c+35 -100 replies
5/12qcow2: Name typedef for cluster typeblock/qcow2-cluster.c block/qcow2-refcount.c block/qcow2.h+13 -123 replies
6/12qcow2: Make distinction between zero cluster types obviousblock/qcow2-cluster.c block/qcow2-refcount.c block/qcow2.c +2 more+64 -843 replies
7/12qcow2: Optimize zero_single_l2() to minimize L2 churnblock/qcow2-cluster.c+13 -20 replies
8/12iotests: Improve _filter_qemu_img_maptests/qemu-iotests/122.out tests/qemu-iotests/154.out tests/qemu-iotests/common.filter+26 -240 replies
9/12iotests: Add test 179 to cover write zeroes with unmaptests/qemu-iotests/179 tests/qemu-iotests/179.out tests/qemu-iotests/group+287 -00 replies
10/12qcow2: Optimize write zero of unaligned tail clusterblock/qcow2.c tests/qemu-iotests/154 tests/qemu-iotests/154.out+293 -20 replies
11/12qcow2: Assert that cluster operations are alignedblock/qcow2-cluster.c+11 -40 replies
12/12qcow2: Discard/zero clusters by byte countblock/qcow2-cluster.c block/qcow2-snapshot.c block/qcow2.c +1 more+39 -410 replies

Reviews trailers per patch

11 of 12 patches have a Reviewed-by or Acked-by.

PatchMax Reitz
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

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

Read the v13 thread

Cover letter [Qemu-devel] [PATCH v13 00/12] qcow2 zero-cluster tweaks [was add blkdebug tests]

I've collected several improvements for qcow2 zero-cluster handling.

Available as a tag at:
git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v13

Marked as v13 for "hysterical raisins", since it it the half of v10 [1] that was not resubmitted as v11 [2].

Depends on Max's block tree:
https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00641.html
and on Max's qcow2 cleanups:
https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00689.html

[1] https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg05227.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg05896.html
[3] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00722.html

Changes since last posting (v12 [3]):
- 2 more new patches: split indentation from other changes (patch 1), and add a typedef (patch 5)
- address Max's findings

001/12:[down] 'qcow2: Nicer variable names in qcow2_update_snapshot_refcount()' 002/12:[0040] [FC] 'qcow2: Use consistent switch indentation' 003/12:[----] [--] 'block: Update comments on BDRV_BLOCK_* meanings' 004/12:[----] [--] 'qcow2: Correctly report status of preallocated zero clusters' 005/12:[down] 'qcow2: Name typedef for cluster type'
006/12:[0032] [FC] 'qcow2: Make distinction between zero cluster types obvious' 007/12:[0002] [FC] 'qcow2: Optimize zero_single_l2() to minimize L2 churn' 008/12:[0002] [FC] 'iotests: Improve _filter_qemu_img_map' 009/12:[0010] [FC] 'iotests: Add test 179 to cover write zeroes with unmap' 010/12:[0003] [FC] 'qcow2: Optimize write zero of unaligned tail cluster' 011/12:[----] [--] 'qcow2: Assert that cluster operations are aligned' 012/12:[----] [--] 'qcow2: Discard/zero clusters by byte count'

Eric Blake (12):
qcow2: Nicer variable names in qcow2_update_snapshot_refcount()
qcow2: Use consistent switch indentation
block: Update comments on BDRV_BLOCK_* meanings
qcow2: Correctly report status of preallocated zero clusters
qcow2: Name typedef for cluster type
qcow2: Make distinction between zero cluster types obvious
qcow2: Optimize zero_single_l2() to minimize L2 churn
iotests: Improve _filter_qemu_img_map
iotests: Add test 179 to cover write zeroes with unmap
qcow2: Optimize write zero of unaligned tail cluster
qcow2: Assert that cluster operations are aligned
qcow2: Discard/zero clusters by byte count

 block/qcow2.h                    |  23 +++--
 include/block/block.h            |  35 ++++----
 include/block/block_int.h        |   7 ++
 block/qcow2-cluster.c            | 181 ++++++++++++++++++++++-----------------
 block/qcow2-refcount.c           | 144 +++++++++++++++----------------
 block/qcow2-snapshot.c           |   7 +-
 block/qcow2.c                    |  38 ++++----
 tests/qemu-iotests/common.filter |   4 +-
 tests/qemu-iotests/060.out       |   6 +-
 tests/qemu-iotests/122.out       |  16 ++--
 tests/qemu-iotests/154           | 160 +++++++++++++++++++++++++++++++++-
 tests/qemu-iotests/154.out       | 158 ++++++++++++++++++++++++++++++----
 tests/qemu-iotests/179           | 130 ++++++++++++++++++++++++++++
 tests/qemu-iotests/179.out       | 156 +++++++++++++++++++++++++++++++++
 tests/qemu-iotests/group         |   1 +
 15 files changed, 840 insertions(+), 226 deletions(-)
 create mode 100755 tests/qemu-iotests/179
 create mode 100644 tests/qemu-iotests/179.out
Signature · 1 line
2.9.3