From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQcPG-0001Rr-8L for qemu-devel@nongnu.org; Mon, 30 Sep 2013 08:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQcPA-00022X-8v for qemu-devel@nongnu.org; Mon, 30 Sep 2013 08:16:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQcPA-00022S-0X for qemu-devel@nongnu.org; Mon, 30 Sep 2013 08:16:48 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8UCGlee003041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 30 Sep 2013 08:16:47 -0400 Message-ID: <52496BBF.3070905@redhat.com> Date: Mon, 30 Sep 2013 14:17:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1380542578-2387-1-git-send-email-famz@redhat.com> <1380542578-2387-7-git-send-email-famz@redhat.com> In-Reply-To: <1380542578-2387-7-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 6/7] commit: remove unused check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 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? Paolo