From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTfZN-0005Iq-LN for qemu-devel@nongnu.org; Thu, 14 Aug 2008 12:21:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTfZM-0005IE-1E for qemu-devel@nongnu.org; Thu, 14 Aug 2008 12:21:01 -0400 Received: from [199.232.76.173] (port=38636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTfZL-0005IB-SU for qemu-devel@nongnu.org; Thu, 14 Aug 2008 12:20:59 -0400 Received: from wr-out-0506.google.com ([64.233.184.233]:12382) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTfZL-0007tj-Lg for qemu-devel@nongnu.org; Thu, 14 Aug 2008 12:20:59 -0400 Received: by wr-out-0506.google.com with SMTP id c46so688861wra.18 for ; Thu, 14 Aug 2008 09:20:57 -0700 (PDT) Message-ID: <48A45B43.5070904@codemonkey.ws> Date: Thu, 14 Aug 2008 11:20:19 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20080813145900.265987809@bull.net> <20080813145944.132440698@bull.net> <48A454E0.2010303@suse.de> In-Reply-To: <48A454E0.2010303@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [patch 4/5][v3] Aggregate same type clusters. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Laurent.Vivier@bull.net, qemu-devel@nongnu.org Kevin Wolf wrote: > Laurent.Vivier@bull.net schrieb: > >> /* seek the the l2 offset in the l1 table */ >> >> - l1_index = offset >> (s->l2_bits + s->cluster_bits); >> + l1_index = offset >> l1_bits; >> if (l1_index >= s->l1_size) >> - return 0; >> + goto out; >> >> l2_offset = s->l1_table[l1_index]; >> >> /* seek the l2 table of the given l2 offset */ >> >> if (!l2_offset) >> - return 0; >> + goto out; >> >> /* load the l2 table in memory */ >> >> l2_offset &= ~QCOW_OFLAG_COPIED; >> l2_table = l2_load(bs, l2_offset); >> if (l2_table == NULL) >> - return 0; >> + goto out; >> > > You agreed that return 0 is actually the right thing to do here because > this is a real error. > I'm inclined to apply this patch (and the rest of the series) and then when Laurent gets back, we can have another patch that changes this back to return 0. Any objections? Regards, Anthony Liguori