qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vpc: Fix size in fixed image creation


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH] vpc: Fix size in fixed image creation
Date: Wed, 11 Feb 2015 17:32:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015-02-11 at 11:22, Kevin Wolf wrote:
If total_sectors is rounded to match the geometry, total_size needs to
be changed as well. Otherwise we end up with an image whose geometry
describes a disk larger than the image file, which doesn't end well.

Signed-off-by: Kevin Wolf <address@hidden>
---
 block/vpc.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Looks fine to me, but the spec says: "When the user creates a hard disk of a certain size, the size of the hard disk image in the virtual machine is smaller than that created by the user. This is because CHS value calculated from the hard disk size is rounded down."

So, well, qemu has been violating the specification all along, I guess.

So, with that in mind (that nobody has been screaming so far):

Reviewed-by: Max Reitz <address@hidden>

Alternatively we may want to "fix" it, and actually let the CHS size be smaller than total_sectors/total_size, if that's possible. But maybe that'll be even worse, so I'm fine either way.

reply via email to

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