From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTeR-0003GM-Tz for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTTeL-0000TP-Rs for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:32:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTeL-0000TF-Jo for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:32:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r989WGeT000423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 05:32:17 -0400 Date: Tue, 8 Oct 2013 17:32:12 +0800 From: Fam Zheng Message-ID: <20131008093212.GA15006@T430s.nay.redhat.com> References: <1380542578-2387-1-git-send-email-famz@redhat.com> <1380542578-2387-7-git-send-email-famz@redhat.com> <52496BBF.3070905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52496BBF.3070905@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 6/7] commit: remove unused check Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, 09/30 14:17, Paolo Bonzini wrote: > Il 30/09/2013 14:02, Fam Zheng ha scritto: > > We support top == active for commit now, remove the check which is dead > > code now. > > > > Signed-off-by: Fam Zheng > > --- > > block/commit.c | 7 ------- > > 1 file changed, 7 deletions(-) > > > > diff --git a/block/commit.c b/block/commit.c > > index ac4b7cc..086f8c9 100644 > > --- a/block/commit.c > > +++ b/block/commit.c > > @@ -198,13 +198,6 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base, > > return; > > } > > > > - /* Once we support top == active layer, remove this check */ > > - if (top == bs) { > > - error_setg(errp, > > - "Top image as the active layer is currently unsupported"); > > - return; > > - } > > - > > if (top == base) { > > error_setg(errp, "Invalid files for merge: top and base are the same"); > > return; > > > > Perhaps this could even become an assertion, or it could take care of > calling commit_active_start? > Good idea. I'll make it an assertion. Thanks, Fam