Skip to content

Fix the reopening of images in 'block-commit'

Alberto Garcia qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2commit: reopen overlay_bs before baseblock/commit.c+4 -41 reply
2/2qemu-iotests: Test the reopening of overlay_bs in 'block-commit'tests/qemu-iotests/040 tests/qemu-iotests/040.out+32 -21 reply

Reviews trailers per patch

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

PatchMax Reitz
1/2R-b
2/2R-b

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

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] Fix the reopening of images in 'block-commit'

This series fixes a bug in the 'block-commit' operation under the following scenario:

[A] <- [B] <- [C] <- [D]

If we do block-commit top=B base=A, the contents of [B] will be written into [A] resulting in this chain:

[A] <- [C] <- [D]

In order to perform this operation, [A] must be reopened in read-write mode but so does [C] because its backing file string needs to be updated to point at [A].

There's a bug in the current code that makes [A] read-only again when
[C] is reopened. This series includes a fix for that bug plus a test case for the scenario.

This affects both master and the 2.4 branch.

Berto

Alberto Garcia (2):
commit: reopen overlay_bs before base
qemu-iotests: Test the reopening of overlay_bs in 'block-commit'

 block/commit.c             |  8 ++++----
 tests/qemu-iotests/040     | 30 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/040.out |  4 ++--
 3 files changed, 36 insertions(+), 6 deletions(-)
Signature · 1 line
2.6.1