All of lore.kernel.org
 help / color / mirror / Atom feed
From: alexander.ivanov@virtuozzo.com
To: qemu-devel@nongnu.org
Cc: den@virtuozzo.com
Subject: [PATCH 0/3] Check and repair duplicated clusters in parallels images
Date: Thu,  4 Aug 2022 16:51:57 +0200	[thread overview]
Message-ID: <20220804145200.564072-1-alexander.ivanov@virtuozzo.com> (raw)

From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

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.

Alexander Ivanov (3):
  parallels: Add checking and repairing duplicate offsets in BAT
  parallels: Let duplicates repairing pass without unwanted messages
  iotests, parallels: Add a test for duplicated clusters

 block/parallels.c                             | 112 ++++++++++++++++--
 tests/qemu-iotests/314                        |  88 ++++++++++++++
 tests/qemu-iotests/314.out                    |  36 ++++++
 .../parallels-2-duplicated-cluster.bz2        | Bin 0 -> 148 bytes
 4 files changed, 227 insertions(+), 9 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.34.1



             reply	other threads:[~2022-08-04 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 14:51 alexander.ivanov [this message]
2022-08-04 14:51 ` [PATCH 1/3] parallels: Add checking and repairing duplicate offsets in BAT alexander.ivanov
2022-08-04 15:18   ` Denis V. Lunev
2022-08-04 14:51 ` [PATCH 2/3] parallels: Let duplicates repairing pass without unwanted messages alexander.ivanov
2022-08-04 15:22   ` Denis V. Lunev
2022-08-04 14:52 ` [PATCH 3/3] iotests, parallels: Add a test for duplicated clusters alexander.ivanov
2022-08-04 15:28   ` Denis V. Lunev
2022-08-04 15:01 ` [PATCH 0/3] Check and repair duplicated clusters in parallels images Denis V. Lunev
2022-08-04 15:31   ` Denis V. Lunev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220804145200.564072-1-alexander.ivanov@virtuozzo.com \
    --to=alexander.ivanov@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.