From patchwork Wed Sep 8 13:29:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 64146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 371FBB6EEB for ; Thu, 9 Sep 2010 00:21:21 +1000 (EST) Received: from localhost ([127.0.0.1]:51484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtLWT-0002uO-6u for incoming@patchwork.ozlabs.org; Wed, 08 Sep 2010 10:21:13 -0400 Received: from [140.186.70.92] (port=56417 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtL2T-0004v4-An for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtKis-0005dw-DQ for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7972) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtKis-0005dg-6Y for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:58 -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.13.8/8.13.8) with ESMTP id o88DTrQD001538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Sep 2010 09:29:53 -0400 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o88DTNnb001351; Wed, 8 Sep 2010 09:29:52 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Wed, 8 Sep 2010 15:29:40 +0200 Message-Id: <1283952582-17498-24-git-send-email-kwolf@redhat.com> In-Reply-To: <1283952582-17498-1-git-send-email-kwolf@redhat.com> References: <1283952582-17498-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 23/25] qemu-img convert: Use cache=unsafe for output image X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If qemu-img crashes during the conversion, the user will throw away the broken output file anyway and start over. So no need to be too cautious. Signed-off-by: Kevin Wolf --- qemu-img.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index d2a978b..4e035e4 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -783,7 +783,8 @@ static int img_convert(int argc, char **argv) goto out; } - out_bs = bdrv_new_open(out_filename, out_fmt, BDRV_O_FLAGS | BDRV_O_RDWR); + out_bs = bdrv_new_open(out_filename, out_fmt, + BDRV_O_FLAGS | BDRV_O_RDWR | BDRV_O_NO_FLUSH); if (!out_bs) { ret = -1; goto out;