From: Sam Eiderman <shmuel.eiderman@oracle.com> To: fam@euphon.net, kwolf@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org Cc: arbel.moshe@oracle.com, karl.heubaum@oracle.com, eyal.moscovici@oracle.com, liran.alon@oracle.com, qemu-devel@nongnu.org, shmuel.eiderman@oracle.com Subject: [Qemu-devel] [PATCH 1/2] vmdk: Fix comment regarding max l1_size coverage Date: Wed, 24 Apr 2019 10:49:00 +0300 [thread overview] Message-ID: <20190424074901.31430-2-shmuel.eiderman@oracle.com> (raw) In-Reply-To: <20190424074901.31430-1-shmuel.eiderman@oracle.com> 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) = 16PB The added vmdk3 calculation: (512 * 1024 * 1024) * 4096(l2 entries) * 512(grain) = 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 <karl.heubaum@oracle.com> Reviewed-by: Eyal Moscovici <eyal.moscovici@oracle.com> Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com> Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com> --- block/vmdk.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index de8cb859f8..fc7378da78 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 get a + /* + * Although with big capacity and small l1_entry_sectors, we can get a * big l1_size, we don't want unbounded value to allocate the table. - * 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/vmfsSparse) + * cluster size: 512B, L2 table size: 4096 entries + */ error_setg(errp, "L1 size too big"); return -EFBIG; } -- 2.13.3
WARNING: multiple messages have this Message-ID (diff)
From: Sam Eiderman <shmuel.eiderman@oracle.com> To: fam@euphon.net, kwolf@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org Cc: eyal.moscovici@oracle.com, arbel.moshe@oracle.com, qemu-devel@nongnu.org, shmuel.eiderman@oracle.com, liran.alon@oracle.com, karl.heubaum@oracle.com Subject: [Qemu-devel] [PATCH 1/2] vmdk: Fix comment regarding max l1_size coverage Date: Wed, 24 Apr 2019 10:49:00 +0300 [thread overview] Message-ID: <20190424074901.31430-2-shmuel.eiderman@oracle.com> (raw) Message-ID: <20190424074900.omiWLm_lRirSW5HdkZ01z5oNoKNMFiexQSlj-gfVI1w@z> (raw) In-Reply-To: <20190424074901.31430-1-shmuel.eiderman@oracle.com> 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) = 16PB The added vmdk3 calculation: (512 * 1024 * 1024) * 4096(l2 entries) * 512(grain) = 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 <karl.heubaum@oracle.com> Reviewed-by: Eyal Moscovici <eyal.moscovici@oracle.com> Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com> Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com> --- block/vmdk.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index de8cb859f8..fc7378da78 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 get a + /* + * Although with big capacity and small l1_entry_sectors, we can get a * big l1_size, we don't want unbounded value to allocate the table. - * 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/vmfsSparse) + * cluster size: 512B, L2 table size: 4096 entries + */ error_setg(errp, "L1 size too big"); return -EFBIG; } -- 2.13.3
next prev parent reply other threads:[~2019-04-24 7:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-24 7:48 [Qemu-devel] [PATCH 0/2]: vmdk: Add read-only support for the new seSparse format Sam Eiderman 2019-04-24 7:48 ` Sam Eiderman 2019-04-24 7:49 ` Sam Eiderman [this message] 2019-04-24 7:49 ` [Qemu-devel] [PATCH 1/2] vmdk: Fix comment regarding max l1_size coverage Sam Eiderman 2019-04-24 10:19 ` [Qemu-devel] [Qemu-block] " yuchenlin 2019-04-24 10:19 ` yuchenlin via Qemu-devel 2019-04-24 7:49 ` [Qemu-devel] [PATCH 2/2] vmdk: Add read-only support for seSparse snapshots Sam Eiderman 2019-04-24 7:49 ` Sam Eiderman 2019-05-27 17:39 ` Max Reitz 2019-05-28 7:57 ` Sam Eiderman 2019-05-28 12:17 ` Max Reitz 2019-05-12 8:14 ` [Qemu-devel] [PATCH 0/2]: vmdk: Add read-only support for the new seSparse format Sam 2019-05-27 8:26 ` Sam Eiderman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190424074901.31430-2-shmuel.eiderman@oracle.com \ --to=shmuel.eiderman@oracle.com \ --cc=arbel.moshe@oracle.com \ --cc=eyal.moscovici@oracle.com \ --cc=fam@euphon.net \ --cc=karl.heubaum@oracle.com \ --cc=kwolf@redhat.com \ --cc=liran.alon@oracle.com \ --cc=mreitz@redhat.com \ --cc=qemu-block@nongnu.org \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.