From patchwork Thu Jun 16 14:07:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 9181089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22AD16075D for ; Thu, 16 Jun 2016 14:27:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12461280DE for ; Thu, 16 Jun 2016 14:27:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02AAD28362; Thu, 16 Jun 2016 14:27:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A28E8280DE for ; Thu, 16 Jun 2016 14:27:50 +0000 (UTC) Received: from localhost ([::1]:49717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDYGr-0000Tm-PG for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Jun 2016 10:27:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDXya-0007c8-Hh for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:09:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDXyY-0000MU-Bs for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:08:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDXyP-0000Gk-Qp; Thu, 16 Jun 2016 10:08:45 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D0B280F67; Thu, 16 Jun 2016 14:08:45 +0000 (UTC) Received: from noname.redhat.com (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5GE8XU5003905; Thu, 16 Jun 2016 10:08:44 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Thu, 16 Jun 2016 16:07:58 +0200 Message-Id: <1466086108-24868-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1466086108-24868-1-git-send-email-kwolf@redhat.com> References: <1466086108-24868-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 16 Jun 2016 14:08:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 09/39] qemu-img bench: Fix uninitialised writethrough mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP If no -t option is specified, bool writethrough stayed uninitialised. Initialise it as false, which makes cache=writeback the default cache mode. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 251386b..14e2661 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3570,7 +3570,7 @@ static int img_bench(int argc, char **argv) BlockBackend *blk = NULL; BenchData data = {}; int flags = 0; - bool writethrough; + bool writethrough = false; struct timeval t1, t2; int i;