Skip to content

qcow2: Rework cluster allocation even more

Kevin Wolf qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest21 patches 3 repliesApplied
  2. v119 patches 5 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/21qemu-iotests: More concurrent allocation scenariostests/qemu-iotests/046 tests/qemu-iotests/046.out+124 -10 replies
2/21qcow2: Fix "total clusters" number in bdrv_checkblock/qcow2-refcount.c tests/qemu-iotests/044.out+4 -20 replies
3/21qcow2: Remove bogus unlock of s->lockblock/qcow2.c+0 -20 replies
4/21qcow2: Handle dependencies earlierblock/qcow2-cluster.c block/qcow2.h+48 -160 replies
5/21qcow2: Improve check for overlapping allocationsblock/qcow2-cluster.c tests/qemu-iotests/038.out+6 -60 replies
6/21qcow2: Change handle_dependency to byte granularityblock/qcow2-cluster.c block/qcow2.h+39 -120 replies
7/21qcow2: Decouple cluster allocation from cluster reuse codeblock/qcow2-cluster.c+20 -150 replies
8/21qcow2: Factor out handle_alloc()block/qcow2-cluster.c trace-events+152 -890 replies
9/21qcow2: handle_alloc(): Get rid of nb_clusters parameterblock/qcow2-cluster.c+15 -40 replies
10/21qcow2: handle_alloc(): Get rid of keep_clusters parameterblock/qcow2-cluster.c block/qcow2.h+32 -170 replies
11/21qcow2: Finalise interface of handle_alloc()block/qcow2-cluster.c block/qcow2.h+21 -130 replies
12/21qcow2: Clean up handle_alloc()block/qcow2-cluster.c+53 -570 replies
13/21qcow2: Factor out handle_copied()block/qcow2-cluster.c trace-events+95 -400 replies
14/21qcow2: handle_copied(): Get rid of nb_clusters parameterblock/qcow2-cluster.c+18 -60 replies
15/21qcow2: handle_copied(): Get rid of keep_clusters parameterblock/qcow2-cluster.c+13 -100 replies
16/21qcow2: handle_copied(): Implement non-zero host_offsetblock/qcow2-cluster.c+20 -80 replies
17/21qcow2: Prepare handle_alloc/copied() for byte granularityblock/qcow2-cluster.c+16 -90 replies
18/21qcow2: Use byte granularity in qcow2_alloc_cluster_offset()block/qcow2-cluster.c+28 -560 replies
19/21qcow2: Allow requests with multiple l2metasblock/qcow2-cluster.c block/qcow2.c block/qcow2.h+17 -30 replies
20/21qcow2: Move cluster gathering to a non-looping loopblock/qcow2-cluster.c+70 -640 replies
21/21qcow2: Gather clusters in a looping loopblock/qcow2-cluster.c tests/qemu-iotests/044.out+42 -322 replies

Reviews trailers per patch

2 of 21 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/21
2/21R-b
3/21
4/21
5/21R-b
6/21
7/21
8/21
9/21
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21

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

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/21] qcow2: Rework cluster allocation even more

This is the start of the latest Delayed COW series. As there seem to be serious problems with the actual Delayed COW (which in fact exist today, but would become a bit easier to hit) and I don't have the time to complete this at the moment, here is another series with preparatory patches, for which there's no reason to not get them applied now.

The result is a somewhat cleaner cluster allocation code in qcow2, and in theory some cases should show improved performance - in practice I think these cases are unlikely to occur, but as the optimisation falls out naturally, let's just take it.

Kevin Wolf (21):
qemu-iotests: More concurrent allocation scenarios
qcow2: Fix "total clusters" number in bdrv_check
qcow2: Remove bogus unlock of s->lock
qcow2: Handle dependencies earlier
qcow2: Improve check for overlapping allocations
qcow2: Change handle_dependency to byte granularity
qcow2: Decouple cluster allocation from cluster reuse code
qcow2: Factor out handle_alloc()
qcow2: handle_alloc(): Get rid of nb_clusters parameter
qcow2: handle_alloc(): Get rid of keep_clusters parameter
qcow2: Finalise interface of handle_alloc()
qcow2: Clean up handle_alloc()
qcow2: Factor out handle_copied()
qcow2: handle_copied(): Get rid of nb_clusters parameter
qcow2: handle_copied(): Get rid of keep_clusters parameter
qcow2: handle_copied(): Implement non-zero host_offset
qcow2: Prepare handle_alloc/copied() for byte granularity
qcow2: Use byte granularity in qcow2_alloc_cluster_offset()
qcow2: Allow requests with multiple l2metas
qcow2: Move cluster gathering to a non-looping loop
qcow2: Gather clusters in a looping loop

 block/qcow2-cluster.c      | 507 ++++++++++++++++++++++++++++++++-------------
 block/qcow2-refcount.c     |   4 +-
 block/qcow2.c              |  16 +-
 block/qcow2.h              |  29 +++
 tests/qemu-iotests/038.out |  10 +-
 tests/qemu-iotests/044.out |   4 +-
 tests/qemu-iotests/046     |  49 ++++-
 tests/qemu-iotests/046.out |  76 +++++++
 trace-events               |   2 +
 9 files changed, 534 insertions(+), 163 deletions(-)
Signature · 1 line
1.8.1.4