From patchwork Fri Jan 4 15:32:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Onkar N Mahajan X-Patchwork-Id: 209478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F0DFE2C0082 for ; Sat, 5 Jan 2013 02:33:00 +1100 (EST) Received: from localhost ([::1]:39918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr9GV-0001eM-5B for incoming@patchwork.ozlabs.org; Fri, 04 Jan 2013 10:32:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr9GL-0001de-Q9 for qemu-devel@nongnu.org; Fri, 04 Jan 2013 10:32:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tr9GI-0003SL-7J for qemu-devel@nongnu.org; Fri, 04 Jan 2013 10:32:49 -0500 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:35098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr9GH-0003Qy-IN for qemu-devel@nongnu.org; Fri, 04 Jan 2013 10:32:46 -0500 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Jan 2013 21:01:28 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp01.in.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 4 Jan 2013 21:01:26 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 03268394004E for ; Fri, 4 Jan 2013 21:02:37 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r04FWXTY49479908 for ; Fri, 4 Jan 2013 21:02:34 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r04FWZkn012746 for ; Sat, 5 Jan 2013 02:32:35 +1100 Received: from [9.79.177.67] ([9.79.177.67]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r04FWXt4012593; Sat, 5 Jan 2013 02:32:35 +1100 From: Onkar N Mahajan To: qemu-devel Date: Fri, 04 Jan 2013 21:02:28 +0530 Message-ID: <1357313548.13838.2.camel@oc2826874472.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-24.el6) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13010415-4790-0000-0000-0000064E9043 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.1 Cc: Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH] Fix : Enable qemu-img QED image commit support. 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 Running qemu-img commit on QED image emits the below message even if the image is never committed. This patch fixes this. Do we need to do any L1, L2 table cleanup here ? I see that cleanup code is commented out in the case of qcow2 (qcow2_make_empty). before patching - # qemu-img commit -f qed ss.qed qemu-img: Image is already committed even before committing the image. after patching - # qemu-img commit -f qed ss.qed Image committed. and image is actually successfully committed. *** Signed-off-by: Onkar N Mahajan/India/IBM Nacked-by: QEMU Patches --- block/qed.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) static BDRVQEDState *acb_to_s(QEDAIOCB *acb) diff --git a/block/qed.c b/block/qed.c index 6c182ca..32f1d53 100644 --- a/block/qed.c +++ b/block/qed.c @@ -695,7 +695,7 @@ static int coroutine_fn bdrv_qed_co_is_allocated(BlockDriverState *bs, static int bdrv_qed_make_empty(BlockDriverState *bs) { - return -ENOTSUP; + return 0; }