qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation
Date: Tue, 12 Feb 2013 15:39:46 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Am 12.02.2013 09:42, schrieb Kevin Wolf:
> It makes qemu use the wrong size for VHD images created by Virtual PC
> that used to work with qemu. This is a regression that can result in
> images appearing corrupted in Virtual PC, and we need very good
> justification to apply such a patch.
>
> At the same time the patch enables the use of the correct size for
> Hyper-V images, but that has never worked with qemu, so if we can't get
> it to work with both for 1.4, I'd rather compromise on this one and not
> apply the patch.
>
> Please revert.
>
> Kevin

I'd appreciate if we could use a more precise description of
the results and the problems with or without the patch.

QEMU does _not_ use a wrong size for any VHD images with the patch.
It passes the correct real image size to the guest. This is compatible
with the behaviour of Hyper-V, Virtual Box and maybe other emulators
which implement the VHD specification as published by Microsoft.
According to the tests run, it is incompatible with VPC which
passes a calculated CHS size.

For images created with QEMU, the calculated CHS size and the real
size are always be the same, so these images work in any case.

It should also be possible to create such images with any other
tool by specifying an image size which is an exact CHS size,
but in most cases VHD images will have a size which is larger
than the calculated CHS size.

As far as we currently know, VPC (and no other tool) passes
the calculated CHS size to its guest.

Copying such images to any other format using qemu-img
works both with and without the patch because all valid
data is below the CHS size.

Copying any kind of non VHD image to VHD also works with and
without the patch because QEMU always calculates an image size
based on the CHS size for newly created images.

Copying a VHD image which was written beyond the CHS size to VHD
needs the patch because otherwise the data behind the CHS size
would get lost. The resulting image should work with any emulator,
also with VPC, because it again has a real size which is equal
to the CHS size.

This all means that the patch is still correct, does not introduce
a regression and should be in QEMU 1.4.

The only problem I see with the patch is my wrong mail address.
Anthony's semi-automated commit did not fix the wrong address
which I had supplied.

Cheers,

Stefan W.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]