From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2X0f-00020I-AH for qemu-devel@nongnu.org; Sun, 12 Jan 2014 21:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2X0W-0001Ux-CJ for qemu-devel@nongnu.org; Sun, 12 Jan 2014 21:12:13 -0500 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:34048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2X0V-0001Up-9d for qemu-devel@nongnu.org; Sun, 12 Jan 2014 21:12:04 -0500 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Jan 2014 12:11:56 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 9616C3578023 for ; Mon, 13 Jan 2014 13:11:53 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0D2BeGX37879924 for ; Mon, 13 Jan 2014 13:11:40 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0D2Bq3X012638 for ; Mon, 13 Jan 2014 13:11:52 +1100 Message-ID: <52D34B66.3020201@linux.vnet.ibm.com> Date: Mon, 13 Jan 2014 10:11:50 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1388950991-30105-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1388950991-30105-5-git-send-email-xiawenc@linux.vnet.ibm.com> <52D1DAD6.8020007@redhat.com> In-Reply-To: <52D1DAD6.8020007@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V9 4/8] qcow2: return int for qcow2_free_clusters() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, peter.crosthwaite@xilinx.com, stefanha@redhat.com 于 2014/1/12 7:59, Max Reitz 写道: > On 05.01.2014 20:43, Wenchao Xia wrote: >> The return value can help caller check whether error happens, >> and it does not need to have *errp since the return value already tips >> what happend. >> >> Signed-off-by: Wenchao Xia >> --- >> block/qcow2-refcount.c | 8 +++++--- >> block/qcow2.h | 6 +++--- >> 2 files changed, 8 insertions(+), 6 deletions(-) > > I'm not sure if we actually need this since it's never really bad to > have an error occur in qcow2_free_clusters(); at least, there's nothing > the caller can do about that and it never blocks any subsequent > operation, so most callers just don't care. But it won't hurt, either, so: > > Reviewed-by: Max Reitz > In snapshot, L1 table <- snapshot_list, if snapshot_list cluster is not freed successfully, L1 talble should be kepted to avoid dangling pointer, So I added this patch to enable the check.