From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: Alberto Garcia <berto@igalia.com>,
qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>
Subject: [Qemu-devel] [RFC PATCH 0/2] Allow checking and repairing corrupted internal snapshots
Date: Thu, 15 Feb 2018 18:30:53 +0200 [thread overview]
Message-ID: <cover.1518711805.git.berto@igalia.com> (raw)
Here's a small series that prevents the user from opening corrupted
internal snapshots and allows 'qemu-img check' to detect and repair
them.
This is an RFC because I tried a few different approaches to deal with
this but I'm not 100% convinced with any of them.
What this one does is simply delete the corrupted snapshots when
'qemu-img check' is run with '-r all'.
Other possible alternatives:
- Do the same but with a different option ('-r snapshots' or whatever)
- Zero the L1 size field of the corrupted snapshots (so they're empty
in practice) but leave them in the snapshot table, so the user would
have to delete them manually afterwards.
- Ask interactively "Do you want to delete this snapshot?" for each
one of them. This was mentioned in the mailing list, but is this
really useful?
Berto
Alberto Garcia (2):
qcow2: Allow checking and repairing corrupted internal snapshots
qcow2: Check the L1 table parameters from all internal snapshots
block/qcow2-snapshot.c | 71 ++++++++++++++++++++++++++++++++++++++++++----
block/qcow2.c | 9 ++++--
block/qcow2.h | 4 ++-
tests/qemu-iotests/080 | 16 ++++++++++-
tests/qemu-iotests/080.out | 42 +++++++++++++++++++++++++--
5 files changed, 131 insertions(+), 11 deletions(-)
--
2.11.0
next reply other threads:[~2018-02-15 16:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 16:30 Alberto Garcia [this message]
2018-02-15 16:30 ` [Qemu-devel] [RFC PATCH 1/2] qcow2: Allow checking and repairing corrupted internal snapshots Alberto Garcia
2018-02-26 13:40 ` Max Reitz
2018-02-27 12:41 ` Alberto Garcia
2018-02-15 16:30 ` [Qemu-devel] [RFC PATCH 2/2] qcow2: Check the L1 table parameters from all " Alberto Garcia
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=cover.1518711805.git.berto@igalia.com \
--to=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).