Received: from eggs.gnu.org ([2001:4830:134:3::10]:60840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsRwV-000158-Uy for qemu-devel@nongnu.org; Mon, 16 Dec 2013 01:46:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsRwP-0002fG-UA for qemu-devel@nongnu.org; Mon, 16 Dec 2013 01:46:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsRwP-0002f2-Be for qemu-devel@nongnu.org; Mon, 16 Dec 2013 01:46:09 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBG6k8fZ014718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 Dec 2013 01:46:08 -0500 From: Fam Zheng Date: Mon, 16 Dec 2013 14:45:33 +0800 Message-Id: <1387176333-30183-8-git-send-email-famz@redhat.com> In-Reply-To: <1387176333-30183-1-git-send-email-famz@redhat.com> References: <1387176333-30183-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v7 7/7] commit: Remove unused check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, stefanha@redhat.com We support top == active for commit now, remove the check and add an assertion here. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- block/commit.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/block/commit.c b/block/commit.c index d4090cb..acec4ac 100644 --- a/block/commit.c +++ b/block/commit.c @@ -198,13 +198,7 @@ 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; - } - + assert(top != bs); if (top == base) { error_setg(errp, "Invalid files for merge: top and base are the same"); return; -- 1.8.5.1