From nobody Wed Dec 17 05:42:08 2025 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=1561124070; cv=none; d=zoho.com; s=zohoarc; b=e4rUXcTmz/HgyL9eAJUMiaEqO84STZd2RXOpgdaECgbAMAHqvZT6nRKN+p7FsCsB9OBtS0tswW/D9focb3VyQgvVEbJCSDFLPpoqiZxISgr0GyJaqBJc4ECuJpKaJiI0/XYwrCovEbnNN4hMJa2+hdw6SbXklaxN5BKS92ZkA3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561124070; 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=B3nThCr0Bk/JulHvu6FryeMKxkgMmZ4utL1Cb4kvYIc=; b=awJO33VULQuL0WRlfnjYuNMOwHW+B6OZ3ueocc0MXXvmMWvn22KNwm38coLVEB/kpioQv1q2dL3hAV3P4fi9R6Djq3a4sbqhMnqcsAmPbetwRmwfTdJ2bgZ8USPt8Shdtm4lopWw0XdLROE8M1GAzBhXpR0xaamRNRxAw0St0B4= 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 1561124070269299.5377903231047; Fri, 21 Jun 2019 06:34:30 -0700 (PDT) Received: from localhost ([::1]:34962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heJgT-0007Jk-0j for importer@patchew.org; Fri, 21 Jun 2019 09:34:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50428) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heJW9-0006IK-75 for qemu-devel@nongnu.org; Fri, 21 Jun 2019 09:23:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1heJW4-0004TV-LQ for qemu-devel@nongnu.org; Fri, 21 Jun 2019 09:23:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1heJVy-0004Oz-AD; Fri, 21 Jun 2019 09:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A46630F1BC0; Fri, 21 Jun 2019 13:23:37 +0000 (UTC) Received: from localhost (ovpn-204-30.brq.redhat.com [10.40.204.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3037D604A3; Fri, 21 Jun 2019 13:23:36 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Fri, 21 Jun 2019 15:23:20 +0200 Message-Id: <20190621132324.2165-5-mreitz@redhat.com> In-Reply-To: <20190621132324.2165-1-mreitz@redhat.com> References: <20190621132324.2165-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 21 Jun 2019 13:23:37 +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] [PULL 4/8] vmdk: Fix comment regarding max l1_size coverage 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 , Peter Maydell , 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" From: Sam Eiderman Commit b0651b8c246d ("vmdk: Move l1_size check into vmdk_add_extent") extended the l1_size check from VMDK4 to VMDK3 but did not update the default coverage in the moved comment. The previous vmdk4 calculation: (512 * 1024 * 1024) * 512(l2 entries) * 65536(grain) =3D 16PB The added vmdk3 calculation: (512 * 1024 * 1024) * 4096(l2 entries) * 512(grain) =3D 1PB Adding the calculation of vmdk3 to the comment. In any case, VMware does not offer virtual disks more than 2TB for vmdk4/vmdk3 or 64TB for the new undocumented seSparse format which is not implemented yet in qemu. Reviewed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Reviewed-by: Liran Alon Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Message-id: 20190620091057.47441-2-shmuel.eiderman@oracle.com Reviewed-by: yuchenlin Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/vmdk.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 51067c774f..0f2e453bf5 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -426,10 +426,15 @@ static int vmdk_add_extent(BlockDriverState *bs, return -EFBIG; } if (l1_size > 512 * 1024 * 1024) { - /* Although with big capacity and small l1_entry_sectors, we can g= et a + /* + * Although with big capacity and small l1_entry_sectors, we can g= et a * big l1_size, we don't want unbounded value to allocate the tabl= e. - * Limit it to 512M, which is 16PB for default cluster and L2 table - * size */ + * Limit it to 512M, which is: + * 16PB - for default "Hosted Sparse Extent" (VMDK4) + * cluster size: 64KB, L2 table size: 512 entries + * 1PB - for default "ESXi Host Sparse Extent" (VMDK3/vmfsSpa= rse) + * cluster size: 512B, L2 table size: 4096 entries + */ error_setg(errp, "L1 size too big"); return -EFBIG; } --=20 2.21.0