From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekATO-0006WS-6l for qemu-devel@nongnu.org; Fri, 09 Feb 2018 10:20:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekATL-0005Jz-0W for qemu-devel@nongnu.org; Fri, 09 Feb 2018 10:20:22 -0500 Date: Fri, 9 Feb 2018 16:19:55 +0100 From: Kevin Wolf Message-ID: <20180209151955.GJ3998@localhost.localdomain> References: <20180209113744.11842-1-berto@igalia.com> <66ffb17c-6238-db0e-5a50-16d83ee12482@redhat.com> <20180209150331.GG3998@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Max Reitz , qemu-devel@nongnu.org, qemu-block@nongnu.org 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