]> git.ipfire.org Git - thirdparty/qemu.git/commit
vpc: Don't round up already aligned BAT sizes
authorKevin Wolf <kwolf@redhat.com>
Thu, 2 Apr 2020 09:36:03 +0000 (11:36 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Apr 2020 13:42:08 +0000 (15:42 +0200)
commit3f6de653b946fe849330208becf79d6af7e876cb
tree0ff87bfb1f2234c5ea5aa1f29508968d174d3b98
parent7f16476fab14fc32388e0ebae793f64673848efa
vpc: Don't round up already aligned BAT sizes

As reported on Launchpad, Azure apparently doesn't accept images for
upload that are not both aligned to 1 MB blocks and have a BAT size that
matches the image size exactly.

As far as I can tell, there is no real reason why we create a BAT that
is one entry longer than necessary for aligned image sizes, so change
that.

(Even though the condition is only mentioned as "should" in the spec and
previous products accepted larger BATs - but we'll try to maintain
compatibility with as many of Microsoft's ever-changing interpretations
of the VHD spec as possible.)

Fixes: https://bugs.launchpad.net/bugs/1870098
Reported-by: Tobias Witek
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200402093603.2369-1-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vpc.c