[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 4/8] vmdk: Fix comment regarding max l1_size cover
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PULL v2 4/8] vmdk: Fix comment regarding max l1_size coverage |
Date: |
Mon, 24 Jun 2019 16:47:36 +0200 |
From: Sam Eiderman <address@hidden>
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 <address@hidden>
Reviewed-by: Eyal Moscovici <address@hidden>
Reviewed-by: Liran Alon <address@hidden>
Reviewed-by: Arbel Moshe <address@hidden>
Signed-off-by: Sam Eiderman <address@hidden>
Message-id: address@hidden
Reviewed-by: yuchenlin <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
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 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.21.0
- [Qemu-devel] [PULL v2 0/8] Block patches, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 2/8] blockdev: enable non-root nodes for transaction drive-backup source, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 4/8] vmdk: Fix comment regarding max l1_size coverage,
Max Reitz <=
- [Qemu-devel] [PULL v2 1/8] nvme: do not advertise support for unsupported arbitration mechanism, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 5/8] vmdk: Reduce the max bound for L1 table size, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 8/8] iotests: Fix 205 for concurrent runs, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 3/8] iotest 134: test cluster-misaligned encrypted write, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 6/8] vmdk: Add read-only support for seSparse snapshots, Max Reitz, 2019/06/24
- [Qemu-devel] [PULL v2 7/8] ssh: switch from libssh2 to libssh, Max Reitz, 2019/06/24