From: Max Reitz <mreitz@redhat.com>
To: Peter Lieven <pl@kamp.de>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, carnold@suse.com, jcody@redhat.com,
famz@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/5] block/vpc: make calculate_geometry spec conform
Date: Tue, 03 Mar 2015 10:05:11 -0500 [thread overview]
Message-ID: <54F5CDA7.9060306@redhat.com> (raw)
In-Reply-To: <1425379316-19639-4-git-send-email-pl@kamp.de>
On 2015-03-03 at 05:41, Peter Lieven wrote:
> The VHD spec [1] allows for total_sectors of 65535 x 16 x 255 (~127GB)
> represented by a CHS geometry. If total_sectors is greater
> than 65535 x 16 x 255 this geometry is set as a maximum.
>
> Qemu, Hyper-V and disk2vhd use this special geometry as an indicator
> to use the image current size from the footer as disk size.
>
> This patch changes vpc_create to effectively calculate a CxHxS geometry
> for the given image size if possible while rounding up if necessary.
> If the image size is to big to be represented in CHS we set the maximum
"too big" (as it was in v1) was correct, no need to make it wrong. :-)
> and write the exact requested image size into the footer.
>
> This partly reverts commit 258d2edb, but leaves support for >127G disks
> intact.
>
> [1] http://download.microsoft.com/download/f/f/e/ffef50a5-07dd-4cf8-aaa3-442c0673a029/Virtual%20Hard%20Disk%20Format%20Spec_10_18_06.doc
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block/vpc.c | 41 ++++++++++++++++++++++-------------------
> 1 file changed, 22 insertions(+), 19 deletions(-)
With s/to big/too big/:
Reviewed-by: Max Reitz <mreitz@redhat.com>
next prev parent reply other threads:[~2015-03-03 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 10:41 [Qemu-devel] [PATCH v2 0/5] block/vpc optimizations Peter Lieven
2015-03-03 10:41 ` [Qemu-devel] [PATCH v2 1/5] block/vpc: optimize vpc_co_get_block_status Peter Lieven
2015-03-03 10:41 ` [Qemu-devel] [PATCH v2 2/5] vpc: Ignore geometry for large images Peter Lieven
2015-03-03 14:59 ` Max Reitz
2015-03-03 10:41 ` [Qemu-devel] [PATCH v2 3/5] block/vpc: make calculate_geometry spec conform Peter Lieven
2015-03-03 15:05 ` Max Reitz [this message]
2015-03-03 10:41 ` [Qemu-devel] [PATCH v2 4/5] block/vpc: rename footer->size -> footer->current_size Peter Lieven
2015-03-03 10:41 ` [Qemu-devel] [PATCH v2 5/5] block/vpc: remove disabled code from get_sector_offset Peter Lieven
2015-03-03 15:07 ` Max Reitz
2015-03-03 21:03 ` [Qemu-devel] [PATCH v2 0/5] block/vpc optimizations Max Reitz
2015-03-17 21:02 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F5CDA7.9060306@redhat.com \
--to=mreitz@redhat.com \
--cc=carnold@suse.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).