From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlBTE-00057h-Js for qemu-devel@nongnu.org; Tue, 26 Nov 2013 00:46:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlBT4-00029k-Nn for qemu-devel@nongnu.org; Tue, 26 Nov 2013 00:46:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlBT4-00029a-Gl for qemu-devel@nongnu.org; Tue, 26 Nov 2013 00:45:50 -0500 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 rAQ5jnS2027985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Nov 2013 00:45:50 -0500 From: Fam Zheng Date: Tue, 26 Nov 2013 13:45:08 +0800 Message-Id: <1385444708-19439-7-git-send-email-famz@redhat.com> In-Reply-To: <1385444708-19439-1-git-send-email-famz@redhat.com> References: <1385444708-19439-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v6 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.4.2