Skip to content

qcow2: Fix corruption on discard during write with COW

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4commit: Drain nodes across all of bdrv_commit()block/commit.c+8 -23 replies
2/4qemu-io: Add 'aio_discard' commandqemu-io-cmds.c+113 -01 reply
3/4qcow2: Fix corruption on discard during write with COWblock/qcow2-cluster.c+49 -39 replies
4/4iotests/046: Test that discard/write_zeroes wait for dependenciestests/qemu-iotests/046 tests/qemu-iotests/046.out+82 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDenis V. Lunev
SeriesR-b T-b
1/4
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] qcow2: Fix corruption on discard during write with COW

This is an alternative fix for the corruption problem reported by Denis:
https://patchew.org/QEMU/[email protected]/

I think it really is a qcow2 level bug and should be fixed on the qcow2 level. The test is also more targeted than just doing random I/O for a while, and therefore runs faster and documents the problem better.

Kevin Wolf (4):
commit: Drain nodes across all of bdrv_commit()
qemu-io: Add 'aio_discard' command
qcow2: Fix corruption on discard during write with COW iotests/046: Test that discard/write_zeroes wait for dependencies

 block/commit.c             |  10 +++-
 block/qcow2-cluster.c      |  52 ++++++++++++++++-
 qemu-io-cmds.c             | 113 +++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/046     |  46 +++++++++++++++
 tests/qemu-iotests/046.out |  36 ++++++++++++
 5 files changed, 252 insertions(+), 5 deletions(-)
Signature · 1 line
2.53.0