qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 0/2] Allow checking and repairing corrupted inte


From: Alberto Garcia
Subject: [Qemu-devel] [RFC PATCH 0/2] Allow checking and repairing corrupted internal snapshots
Date: Thu, 15 Feb 2018 18:30:53 +0200

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]