From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6kHH-0003Q7-2R for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:52:39 -0400 Received: from [140.186.70.92] (port=49941 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6kHF-0003PB-7P for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:52:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6kHC-0005m1-GC for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:52:35 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:41983) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6kHC-0005lj-04 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:52:34 -0400 Received: by bwz1 with SMTP id 1so16851579bwz.2 for ; Tue, 27 Apr 2010 05:52:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1272364518-9386-1-git-send-email-kwolf@redhat.com> References: <1272364518-9386-1-git-send-email-kwolf@redhat.com> Date: Tue, 27 Apr 2010 13:52:32 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Tue, Apr 27, 2010 at 11:35 AM, Kevin Wolf wrote: > --- a/block/qcow2-refcount.c > +++ b/block/qcow2-refcount.c > @@ -638,7 +638,7 @@ void qcow2_free_clusters(BlockDriverState *bs, > =A0 =A0 ret =3D update_refcount(bs, offset, size, -1); > =A0 =A0 if (ret < 0) { > =A0 =A0 =A0 =A0 fprintf(stderr, "qcow2_free_clusters failed: %s\n", strer= ror(-ret)); > - =A0 =A0 =A0 =A0abort(); > + =A0 =A0 =A0 =A0/* TODO Remember the clusters to free them later and avo= id leaking */ > =A0 =A0 } > =A0} Has there been discussion on a fix mode for qemu-img check? For qcow2 it could write new refcounts, calculated by traversing the L1/L2 tables of the image and snapshots. Perhaps it would also dump out the orphaned clusters to a lost+found. Stefan