• Eric Blake's avatar
    qcow2: Document some maximum size constraints · d3e1a7eb
    Eric Blake authored
    Although off_t permits up to 63 bits (8EB) of file offsets, in
    practice, we're going to hit other limits first.  Document some
    of those limits in the qcow2 spec (some are inherent, others are
    implementation choices of qemu), and how choice of cluster size
    can influence some of the limits.
    
    While we cannot map any uncompressed virtual cluster to any
    address higher than 64 PB (56 bits) (due to the current L1/L2
    field encoding stopping at bit 55), qemu's cap of 8M for the
    refcount table can still access larger host addresses for some
    combinations of large clusters and small refcount_order.  For
    comparison, ext4 with 4k blocks caps files at 16PB.
    
    Another interesting limit: for compressed clusters, the L2 layout
    requires an ever-smaller maximum host offset as cluster size gets
    larger, down to a 512 TB maximum with 2M clusters.  In particular,
    note that with a cluster size of 8k or smaller, the L2 entry for
    a compressed cluster could technically point beyond the 64PB mark,
    but when you consider that with 8k clusters and refcount_order = 0,
    you cannot access beyond 512T without exceeding qemu's limit of an
    8M cap on the refcount table, it is unlikely that any image in the
    wild has attempted to do so.  To be safe, let's document that bits
    beyond 55 in a compressed cluster must be 0.
    Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
    Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
    d3e1a7eb
Name
Last commit
Last update
..
config Loading commit data...
devel Loading commit data...
interop Loading commit data...
specs Loading commit data...
spin Loading commit data...
COLO-FT.txt Loading commit data...
amd-memory-encryption.txt Loading commit data...
block-replication.txt Loading commit data...
bootindex.txt Loading commit data...
can.txt Loading commit data...
ccid.txt Loading commit data...
colo-proxy.txt Loading commit data...
generic-loader.txt Loading commit data...
igd-assign.txt Loading commit data...
image-fuzzer.txt Loading commit data...
memory-hotplug.txt Loading commit data...
multi-thread-compression.txt Loading commit data...
multiseat.txt Loading commit data...
nvdimm.txt Loading commit data...
pci_expander_bridge.txt Loading commit data...
pcie.txt Loading commit data...
pcie_pci_bridge.txt Loading commit data...
pr-manager.rst Loading commit data...
pvrdma.txt Loading commit data...
qcow2-cache.txt Loading commit data...
qdev-device-use.txt Loading commit data...
qemu-block-drivers.texi Loading commit data...
qemu-cpu-models.texi Loading commit data...
qemu_logo.pdf Loading commit data...
qemupciserial.inf Loading commit data...
rdma.txt Loading commit data...
replay.txt Loading commit data...
spice-port-fqdn.txt Loading commit data...
throttle.txt Loading commit data...
usb-storage.txt Loading commit data...
usb2.txt Loading commit data...
vfio-ap.txt Loading commit data...
virtio-balloon-stats.txt Loading commit data...
xbzrle.txt Loading commit data...
xen-save-devices-state.txt Loading commit data...