]> git.proxmox.com Git - qemu.git/commit - block/vpc.c
block: vpc support for ~2 TB disks
authorCharles Arnold <carnold@suse.com>
Wed, 31 Oct 2012 02:59:32 +0000 (20:59 -0600)
committerKevin Wolf <kwolf@redhat.com>
Tue, 11 Dec 2012 10:04:26 +0000 (11:04 +0100)
commit258d2edbcd4bb5d267c96163333820332e1c14fa
tree297b5a5c8b66a74ffcc341332f126b19978d8793
parent1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2
block: vpc support for ~2 TB disks

The VHD specification allows for up to a 2 TB disk size. The current
implementation in qemu emulates EIDE and ATA-2 hardware which only allows
for up to 127 GB.  This disk size limitation can be overridden by allowing
up to 255 heads instead of the normal 4 bit limitation of 16.  Doing so
allows disk images to be created of up to nearly 2 TB.  This change does
not violate the VHD format specification nor does it change how smaller
disks (ie, <=127GB) are defined.

[Charles Arnold also writes: "In analyzing a 160 GB VHD fixed disk image
created on Windows 2008 R2, it appears that MS is also ignoring the CHS
values in the footer geometry field in whatever driver they use for
accessing the image.  The CHS values are set at 65535,16,255 which
obviously doesn't represent an image size of 160 GB." -- Stefan]

Signed-off-by: Charles Arnold <carnold@suse.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/vpc.c