From nobody Mon Feb 9 10:29:37 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 154714828083940.44129187725878; Thu, 10 Jan 2019 11:24:40 -0800 (PST) Received: from localhost ([127.0.0.1]:32872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghfwV-0000L8-PT for importer@patchew.org; Thu, 10 Jan 2019 14:24:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghfrH-00059H-B6 for qemu-devel@nongnu.org; Thu, 10 Jan 2019 14:19:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghfrG-0008WE-MK for qemu-devel@nongnu.org; Thu, 10 Jan 2019 14:19:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghfrE-0008TZ-SO; Thu, 10 Jan 2019 14:19:12 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18255C0C8BA7; Thu, 10 Jan 2019 19:19:12 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-216.phx2.redhat.com [10.3.116.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 713E260C67; Thu, 10 Jan 2019 19:19:11 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 13:18:57 -0600 Message-Id: <20190110191901.5082-4-eblake@redhat.com> In-Reply-To: <20190110191901.5082-1-eblake@redhat.com> References: <20190110191901.5082-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 10 Jan 2019 19:19:12 +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 v3 3/6] Revert "vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE" 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-block@nongnu.org, Stefan Weil , armbru@redhat.com, Max Reitz , lbloch@janustech.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This reverts commit 3dd5b8f4718c6ca1eadb16dd67a8cad76455ddb0. Now that we can express QemuOpts values as an integer, we don't have to be careful about how we spell our macro. --- block/vdi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 65659c9b179..180a45b70f6 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -85,7 +85,7 @@ #define BLOCK_OPT_STATIC "static" #define SECTOR_SIZE 512 -#define DEFAULT_CLUSTER_SIZE S_1MiB +#define DEFAULT_CLUSTER_SIZE (1 * MiB) #if defined(CONFIG_VDI_DEBUG) #define VDI_DEBUG 1 @@ -432,7 +432,7 @@ static int vdi_open(BlockDriverState *bs, QDict *option= s, int flags, goto fail; } else if (header.block_size !=3D DEFAULT_CLUSTER_SIZE) { error_setg(errp, "unsupported VDI image (block size %" PRIu32 - " is not %" PRIu32 ")", + " is not %" PRIu64 ")", header.block_size, DEFAULT_CLUSTER_SIZE); ret =3D -ENOTSUP; goto fail; --=20 2.20.1