]> git.proxmox.com Git - mirror_qemu.git/commit
block/vpc: Use the correct max sector count for VHD images
authorJeff Cody <jcody@redhat.com>
Wed, 23 Mar 2016 03:33:41 +0000 (23:33 -0400)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Apr 2016 15:22:12 +0000 (17:22 +0200)
commitc23fb11bbba90da2a5e2e121fb391a608b82afe5
tree2bf9051752e0a0490253b2edacdaf0b299bc58b1
parentbab246db1dbb37fe55fb84c95ad086f550f443a5
block/vpc: Use the correct max sector count for VHD images

The old VHD_MAX_SECTORS value is incorrect, and is a throwback
to the CHS calculations.  The VHD specification allows images up to 2040
GiB, which (using 512 byte sectors) corresponds to a maximum number of
sectors of 0xff000000, rather than the old value of 0xfe0001ff.

Update VHD_MAX_SECTORS to reflect the correct value.

Also, update comment references to the actual size limit, and correct
one compare so that we can have sizes up to the limit.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vpc.c