From nobody Mon Feb 9 16:12:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562953047; cv=none; d=zoho.com; s=zohoarc; b=bP0hNiM/NUQKKPg22enFJxagLVhZrYP5iITUaUAdPUHG7chrjBexH+ZTQcNuR5kV/A74vJz579ac23uljKxFTUc/r9n04Pdp4A9TwIgVh//G7w/Y6bhFrSGClyPr8k4gusfRfQl7p2ave8s2t5HqJndIVgmsZA0Qc0JONTyg07U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562953047; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=YMtEJ8xD4H0q46KQMWuKZ8+LrToa8ngC+R9YhPrzU/E=; b=fF0u7I32/pGTGMgh/WTptjf8+5cMNegj2Uwg+wADQpKrPTYGZuVDtu5mRVJNPg7eeQt2X05eRaptOtnedRTSskdpeYqMPYfi5go5NDDKgP38A0vMW13u3zqvZWcdgT7Xp1ve6ZvSTx3IkCRdAx2kaJt591umuNA+55p6qcpkD8M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15629530478497.525143101870185; Fri, 12 Jul 2019 10:37:27 -0700 (PDT) Received: from localhost ([::1]:51540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlzU5-0002e2-8f for importer@patchew.org; Fri, 12 Jul 2019 13:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39737) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlzSv-0006WW-VT for qemu-devel@nongnu.org; Fri, 12 Jul 2019 13:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlzSu-0004NC-Ot for qemu-devel@nongnu.org; Fri, 12 Jul 2019 13:36:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlzSs-0004G2-EY; Fri, 12 Jul 2019 13:36:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C18073082211; Fri, 12 Jul 2019 17:36:09 +0000 (UTC) Received: from localhost (unknown [10.40.205.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FE9E5C207; Fri, 12 Jul 2019 17:36:09 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Fri, 12 Jul 2019 19:35:56 +0200 Message-Id: <20190712173600.14554-4-mreitz@redhat.com> In-Reply-To: <20190712173600.14554-1-mreitz@redhat.com> References: <20190712173600.14554-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 12 Jul 2019 17:36:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 3/7] block: Use blk_truncate_for_formatting() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky --- block/parallels.c | 2 +- block/qcow.c | 2 +- block/qcow2.c | 2 +- block/qed.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 00fae125d1..a17b2d92f2 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -563,7 +563,7 @@ static int coroutine_fn parallels_co_create(BlockdevCre= ateOptions* opts, blk_set_allow_write_beyond_eof(blk, true); =20 /* Create image format */ - ret =3D blk_truncate(blk, 0, PREALLOC_MODE_OFF, errp); + ret =3D blk_truncate_for_formatting(blk, 0, errp); if (ret < 0) { goto out; } diff --git a/block/qcow.c b/block/qcow.c index 5bdf72ba33..86034135f9 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -858,7 +858,7 @@ static int coroutine_fn qcow_co_create(BlockdevCreateOp= tions *opts, blk_set_allow_write_beyond_eof(qcow_blk, true); =20 /* Create image format */ - ret =3D blk_truncate(qcow_blk, 0, PREALLOC_MODE_OFF, errp); + ret =3D blk_truncate_for_formatting(qcow_blk, 0, errp); if (ret < 0) { goto exit; } diff --git a/block/qcow2.c b/block/qcow2.c index 039bdc2f7e..f3e53c781d 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -3184,7 +3184,7 @@ qcow2_co_create(BlockdevCreateOptions *create_options= , Error **errp) blk_set_allow_write_beyond_eof(blk, true); =20 /* Clear the protocol layer and preallocate it if necessary */ - ret =3D blk_truncate(blk, 0, PREALLOC_MODE_OFF, errp); + ret =3D blk_truncate_for_formatting(blk, 0, errp); if (ret < 0) { goto out; } diff --git a/block/qed.c b/block/qed.c index 77c7cef175..ec244158b5 100644 --- a/block/qed.c +++ b/block/qed.c @@ -673,7 +673,7 @@ static int coroutine_fn bdrv_qed_co_create(BlockdevCrea= teOptions *opts, l1_size =3D header.cluster_size * header.table_size; =20 /* File must start empty and grow, check truncate is supported */ - ret =3D blk_truncate(blk, 0, PREALLOC_MODE_OFF, errp); + ret =3D blk_truncate_for_formatting(blk, 0, errp); if (ret < 0) { goto out; } --=20 2.21.0