[PATCH 0/3] Repair duplicated clusters in parallels image

Natalia Kuzmina posted 3 patches 2 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220418110430.319911-1-natalia.kuzmina@openvz.org
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
block/parallels.c                             |  66 ++++++++++++-
docs/tools/qemu-img.rst                       |   2 +-
tests/qemu-iotests/314                        |  88 ++++++++++++++++++
tests/qemu-iotests/314.out                    |  36 +++++++
.../parallels-2-duplicated-cluster.bz2        | Bin 0 -> 148 bytes
5 files changed, 189 insertions(+), 3 deletions(-)
create mode 100755 tests/qemu-iotests/314
create mode 100644 tests/qemu-iotests/314.out
create mode 100644 tests/qemu-iotests/sample_images/parallels-2-duplicated-cluster.bz2
[PATCH 0/3] Repair duplicated clusters in parallels image
Posted by Natalia Kuzmina 2 years ago
Parallels image file can be corrupted this way: two guest memory areas
refer to the same host memory area (duplicated offsets in BAT). 
qemu-img check copies data from duplicated cluster to the new cluster and
writes new corresponding offset to BAT instead of duplicated one.

Test 314 uses sample corrupted image parallels-2-duplicated-cluster.bz2. 
Reading from duplicated offset and from original offset returns the same
data. After repairing changing either of these blocks of data
does not affect another one.

Natalia Kuzmina (3):
  qemu-img check: fixing duplicated clusters for parallels format
  iotests: 314 test on duplicated clusters (parallels format)
  docs: parallels image format supports consistency checks

 block/parallels.c                             |  66 ++++++++++++-
 docs/tools/qemu-img.rst                       |   2 +-
 tests/qemu-iotests/314                        |  88 ++++++++++++++++++
 tests/qemu-iotests/314.out                    |  36 +++++++
 .../parallels-2-duplicated-cluster.bz2        | Bin 0 -> 148 bytes
 5 files changed, 189 insertions(+), 3 deletions(-)
 create mode 100755 tests/qemu-iotests/314
 create mode 100644 tests/qemu-iotests/314.out
 create mode 100644 tests/qemu-iotests/sample_images/parallels-2-duplicated-cluster.bz2

-- 
2.25.1