Received: from eggs.gnu.org ([2001:4830:134:3::10]:56786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTmC4-0001UA-46 for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:20:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTmBy-0007oC-4x for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:20:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTmBx-0007o8-TM for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:20:14 -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 r995K8OI005298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 01:20:12 -0400 From: Fam Zheng Date: Wed, 9 Oct 2013 13:19:43 +0800 Message-Id: <1381295983-18945-7-git-send-email-famz@redhat.com> In-Reply-To: <1381295983-18945-1-git-send-email-famz@redhat.com> References: <1381295983-18945-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v5 6/6] 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 --- 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.3.1