Am 09.02.2018 um 16:11 hat Alberto Garcia geschrieben: > On Fri 09 Feb 2018 04:03:31 PM CET, Kevin Wolf wrote: > > How about we move the check to bdrv_open() as proposed, but make it > > conditional so that it's skipped with BDRV_O_CHECK and then add a way > > to fix the situation with qemu-img check -r? > > That was one of the alternatives that I was considering, but you can't > really fix a broken L1 table pointer, can you? > > What you can probably do is allow deleting the snapshot, but 'qemu-img > snapshot' doesn't use BDRV_O_CHECK. We'd have to change that, look for a > new flag or think of some other alternative. > > Or, perhaps more easily, make 'qemu-img check' delete all corrupted > snapshots.
Yes, the latter is what I was thinking of. Of course, that would require a new -r option because it would be a destructive operation. Maybe it would even be worth making such destructive operations interactive so that the user has to explicitly confirm each snapshot that we delete. Not sure though. Kevin