From nobody Tue Feb 10 20:29:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1590706586; cv=none; d=zohomail.com; s=zohoarc; b=fU+DoXxmylC1D98vjX0JkttAtCBy9cRT8av12d/q8fEGqLhoHCgGRHJBWw+NrMOzdIF/7Gyt6eIA2dm5caysIT8Wa+dy8rJB8KTg8ZpR4YhB6SU2iCHgrLEmj7rt+BKJKjUK9H+G2JWjcZmiVb4Pv9uGHI7RKdHlqhf6AXS2bS4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590706586; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=itQBN5U3tIfrRjr7457Zr+edY1y64XE74HVeivo86lM=; b=eh3DDy25eQSi1TdU8PejO42ecNdJbIJoWu9b6+boUeQUJsFU2Hqxzfd1zgrniOyegmLLLvLRnpw0WaTrk4w+h/pg17nr9sLLf5tVVD2svwyEdd+hsNm+Xwjgrsk0QQ6+twDwuWbyrxS031Ki2rJky1agpSI6u68YFEDjoTzHPDs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 159070658660593.46323001091196; Thu, 28 May 2020 15:56:26 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeRRT-0001gI-CN; Thu, 28 May 2020 22:56:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeRRS-0001ff-HW for xen-devel@lists.xenproject.org; Thu, 28 May 2020 22:56:02 +0000 Received: from forwardcorp1p.mail.yandex.net (unknown [2a02:6b8:0:1472:2741:0:8b6:217]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6215db2a-a136-11ea-81bc-bc764e2007e4; Thu, 28 May 2020 22:55:54 +0000 (UTC) Received: from mxbackcorp1g.mail.yandex.net (mxbackcorp1g.mail.yandex.net [IPv6:2a02:6b8:0:1402::301]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id 32C8B2E129E; Fri, 29 May 2020 01:55:53 +0300 (MSK) Received: from iva4-7c3d9abce76c.qloud-c.yandex.net (iva4-7c3d9abce76c.qloud-c.yandex.net [2a02:6b8:c0c:4e8e:0:640:7c3d:9abc]) by mxbackcorp1g.mail.yandex.net (mxbackcorp/Yandex) with ESMTP id khWQ9a8QXE-tmImd9j8; Fri, 29 May 2020 01:55:53 +0300 Received: from dynamic-vpn.dhcp.yndx.net (dynamic-vpn.dhcp.yndx.net [2a02:6b8:b081:1318::1:10]) by iva4-7c3d9abce76c.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id tdfEhvD3Vg-tlWSL1MN; Fri, 29 May 2020 01:55:48 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Inumbo-ID: 6215db2a-a136-11ea-81bc-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1590706553; bh=itQBN5U3tIfrRjr7457Zr+edY1y64XE74HVeivo86lM=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=QxWGv/p1mseN6guUFN5KYndvGTq4k0mrL5Ss9GRClWK210Mu68nWVZwYo4tHdwoJs d+lIK5E30z/7U6EHatw/dmi9UaDzWYrjqjwwQL53PdI5ERCeRwPNvvOGheMBrtWdGx Fynmct87UZBGpabgcraQ8zfOg+ZRm9zywA7JMFI4= Authentication-Results: mxbackcorp1g.mail.yandex.net; dkim=pass header.i=@yandex-team.ru From: Roman Kagan To: qemu-devel@nongnu.org Subject: [PATCH v8 8/8] block: lift blocksize property limit to 2 MiB Date: Fri, 29 May 2020 01:55:16 +0300 Message-Id: <20200528225516.1676602-9-rvkagan@yandex-team.ru> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528225516.1676602-1-rvkagan@yandex-team.ru> References: <20200528225516.1676602-1-rvkagan@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Stefano Stabellini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Paul Durrant , John Snow , "Michael S. Tsirkin" , Laurent Vivier , Eric Blake , Max Reitz , Keith Busch , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , Anthony Perard , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Logical and physical block sizes in QEMU are limited to 32 KiB. This appears unnecessarily tight, and we've seen bigger block sizes handy at times. Lift the limitation up to 2 MiB which appears to be good enough for everybody, and matches the qcow2 cluster size limit. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake --- hw/core/qdev-properties.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 63d48db70c..ead35d7ffd 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -784,9 +784,12 @@ const PropertyInfo qdev_prop_size32 =3D { /* lower limit is sector size */ #define MIN_BLOCK_SIZE 512 #define MIN_BLOCK_SIZE_STR "512 B" -/* upper limit is the max power of 2 that fits in uint16_t */ -#define MAX_BLOCK_SIZE (32 * KiB) -#define MAX_BLOCK_SIZE_STR "32 KiB" +/* + * upper limit is arbitrary, 2 MiB looks sufficient for all sensible uses,= and + * matches qcow2 cluster size limit + */ +#define MAX_BLOCK_SIZE (2 * MiB) +#define MAX_BLOCK_SIZE_STR "2 MiB" =20 static void set_blocksize(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) --=20 2.26.2