qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/2] Allow checking and repairing corrupted internal snapshots
@ 2018-02-15 16:30 Alberto Garcia
  2018-02-15 16:30 ` [Qemu-devel] [RFC PATCH 1/2] qcow2: " Alberto Garcia
  2018-02-15 16:30 ` [Qemu-devel] [RFC PATCH 2/2] qcow2: Check the L1 table parameters from all " Alberto Garcia
  0 siblings, 2 replies; 5+ messages in thread
From: Alberto Garcia @ 2018-02-15 16:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alberto Garcia, qemu-block, Kevin Wolf, Max Reitz, Eric Blake

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-27 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 16:30 [Qemu-devel] [RFC PATCH 0/2] Allow checking and repairing corrupted internal snapshots Alberto Garcia
2018-02-15 16:30 ` [Qemu-devel] [RFC PATCH 1/2] qcow2: " 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

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).