From patchwork Mon Dec 16 06:45:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 301481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44BF22C007C for ; Mon, 16 Dec 2013 17:48:21 +1100 (EST) Received: from localhost ([::1]:54062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsRyS-00042E-2V for incoming@patchwork.ozlabs.org; Mon, 16 Dec 2013 01:48:16 -0500 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 Received: from ad.nay.redhat.com ([10.66.6.190]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBG6jeTQ001805; Mon, 16 Dec 2013 01:46:06 -0500 From: Fam Zheng To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v7 7/7] commit: Remove unused check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;