mbox series

[v2,0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

Message ID 20190906195750.17651-1-mlevitsk@redhat.com (mailing list archive)
Headers show
Series Fix qcow2+luks corruption introduced by commit 8ac0f15f335 | expand

Message

Maxim Levitsky Sept. 6, 2019, 7:57 p.m. UTC
Commit 8ac0f15f335 accidently broke the COW of non changed areas
of newly allocated clusters, when the write spans multiple clusters,
and needs COW both prior and after the write.
This results in 'after' COW area being encrypted with wrong
sector address, which render it corrupted.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922

CC: qemu-stable <qemu-stable@nongnu.org>

V2: grammar, spelling and code style fixes.

Best regards,
	Maxim Levitsky

Maxim Levitsky (3):
  block/qcow2: refactoring of threaded encryption code
  block/qcow2: fix the corruption when rebasing luks encrypted files
  qemu-iotests: Add test for bz #1745922

 block/qcow2-cluster.c      | 30 ++++++++-------
 block/qcow2-threads.c      | 61 ++++++++++++++++++++++++-------
 tests/qemu-iotests/263     | 75 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/263.out | 19 ++++++++++
 tests/qemu-iotests/group   |  1 +
 5 files changed, 160 insertions(+), 26 deletions(-)
 create mode 100755 tests/qemu-iotests/263
 create mode 100644 tests/qemu-iotests/263.out