Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXBnO-0008T0-OJ for qemu-devel@nongnu.org; Tue, 19 Jan 2010 05:58:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXBnK-0008Qw-1S for qemu-devel@nongnu.org; Tue, 19 Jan 2010 05:58:50 -0500 Received: from [199.232.76.173] (port=58921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXBnJ-0008Qp-Ps for qemu-devel@nongnu.org; Tue, 19 Jan 2010 05:58:45 -0500 Received: from verein.lst.de ([213.95.11.210]:39991) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NXBnJ-0000Jy-59 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 05:58:45 -0500 Date: Tue, 19 Jan 2010 11:58:43 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 01/10] qcow2: Fix error handling in qcow2_grow_l1_table Message-ID: <20100119105843.GB12960@lst.de> References: <1263816696-24122-1-git-send-email-kwolf@redhat.com> <1263816696-24122-2-git-send-email-kwolf@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1263816696-24122-2-git-send-email-kwolf@redhat.com> 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 Mon, Jan 18, 2010 at 01:11:27PM +0100, Kevin Wolf wrote: > Return the appropriate error value instead of always using EIO. Don't free the > L1 table on errors, we still need it. > > Signed-off-by: Kevin Wolf Looks good correct, but shouldn't we free the clusters for the new l1 table if writing to it fails? At least dependend on whether it's EIO in which case we could assume the sectos on disk to be worn out.