From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0005C79F87 for ; Fri, 4 Sep 2026 16:19:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x2WcJ-0000Tt-VG; Fri, 04 Sep 2026 12:18:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x2WcI-0000Sz-M8; Fri, 04 Sep 2026 12:18:14 -0400 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x2WcH-0001Hn-67; Fri, 04 Sep 2026 12:18:14 -0400 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 9030460211; Fri, 4 Sep 2026 16:18:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CADE1F00A3D; Fri, 4 Sep 2026 16:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788538691; bh=TO+F2pc2vn4cH6gj+eUGA+TbOU46rfxX7z+qzRTHsOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hbJUEgiojT1Qbh29+oBjqKlgngjidjQEFQhHErr7Uke3c7uWrms/4aQ+KbYFdygE1 bYuMDav+uE5c/K6W1gPLvoABvg1Dq8ZJeOptpydqpbpEfhcAJ+9748LByQ8vj2gLsV WjGMdPLtM+uWV+6bXfef3wqQHxmyVyd6OyHh5vYnejupzioZiVxHbbX+nL1oCpnY8L 3CiN3PW+/Pw0BcVTrAahEOZXbf5Eq7cxF7/G3NdZOsgFAOCZhryfeqvBbf3u4OR8Hz 0f5I7HFsK9MSeiz5a1H0fdG4cIXPvTJRfBGfL/XcjOGx97egA30lbkN+T9TqBR6p7s RN1Gobfn9Unbg== From: Niklas Cassel To: Stefan Hajnoczi , Kevin Wolf , Hanna Reitz Cc: Sam Li , Damien Le Moal , Niklas Cassel , qemu-block@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v3 01/12] block: widen BlockLimits.zone_size to uint64_t Date: Fri, 4 Sep 2026 18:17:49 +0200 Message-ID: <20260904161801.1568841-2-cassel@kernel.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260904161801.1568841-1-cassel@kernel.org> References: <20260904161801.1568841-1-cassel@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2600:3c04:e001:324:0:1991:8:25; envelope-from=cassel@kernel.org; helo=tor.source.kernel.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Sam Li The zone-size field in BlockLimits is currently uint32_t, capping expressible zone sizes at 4 GiB. Real zoned-device protocols like NVMe ZNS allow larger zones. Widen BlockLimits.zone_size to uint64_t to match. Signed-off-by: Sam Li Reviewed-by: Niklas Cassel Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel --- block/file-posix.c | 2 +- include/block/block_int-common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 9aad156aad..c0d6ee30e4 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -3598,7 +3598,7 @@ raw_co_zone_append(BlockDriverState *bs, if (*offset & zone_size_mask) { error_report("sector offset %" PRId64 " is not aligned to zone size " - "%" PRId32 "", *offset / 512, bs->bl.zone_size / 512); + "%" PRId64 "", *offset / 512, bs->bl.zone_size / 512); return -EINVAL; } diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index 147c08155f..7571ed9968 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -901,7 +901,7 @@ typedef struct BlockLimits { BlockZoneModel zoned; /* zone size expressed in bytes */ - uint32_t zone_size; + uint64_t zone_size; /* total number of zones */ uint32_t nr_zones; -- 2.55.0