qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Jeff Cody <jcody@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create
Date: Wed, 24 Feb 2016 20:28:20 +0100	[thread overview]
Message-ID: <56CE0454.5050202@kamp.de> (raw)
In-Reply-To: <20160224134056.GD23671@localhost.localdomain>

Am 24.02.2016 um 14:40 schrieb Jeff Cody:
> On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote:
>> Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben:
>>> if the size is forced I would set the chs values to max. this way no
>>> new creator String is needed and it is even backwards compatible. this
>>> is what disk2vhd does.
>> Does disk2vhd do it this way even if the size is smaller than the
>> maximum that can be represented with CHS?
>>
> I don't know about disk2vhd, but I just created a 5G dynamic VHD
> image on Hyper-V, and it produced:
>
> cyl: 10402, heads: 16, secs: 63
> virtual size: 5.0G (5368709120 bytes)
>
> (the virtual size as calculated by CHS in that case would have been
> 5368430592 bytes)
>
> I then tested the reverse - I modified qemu to create a VHD image with
> 5G as the current_size, but maxed out CHS parameters.  I imported it
> into Hyper-V, and it worked fine - just recognized as a 5G disk with
> 5368709120 bytes.

So the idea to set CHS to MAX is not that bad.

>
> But with all that, it seems like it may be better to mimic the Hyper-V
> behavior, and use a new creator app string, with the normal CHS
> values.

But this means that it is not backwards compatible. Maxing out CHS
when forcing the size would mean all old qemu version would look
at current size and not CHS.

Might it be that Hyper-V and others use CHS when an ATA disk is emulated
and the cur_size otherwise? I think this is what virtualbox does.

Peter

  reply	other threads:[~2016-02-24 19:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  0:47 [Qemu-devel] [PATCH 0/4] VHD/VPC format compatibility Jeff Cody
2016-02-24  0:47 ` [Qemu-devel] [PATCH 1/4] block/vpc: choose size calculation method based on creator_app field Jeff Cody
2016-02-24  0:47 ` [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images Jeff Cody
2016-02-24 10:23   ` Kevin Wolf
2016-02-24 12:19     ` Jeff Cody
2016-02-24 15:40     ` Jeff Cody
2016-02-24 15:44       ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-02-24 15:47         ` Jeff Cody
2016-02-24 15:49       ` Max Reitz
2016-02-24  0:47 ` [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create Jeff Cody
2016-02-24 10:19   ` Kevin Wolf
2016-02-24 12:24     ` Jeff Cody
2016-02-24 12:44       ` Peter Lieven
2016-02-24 13:07         ` Kevin Wolf
2016-02-24 13:40           ` Jeff Cody
2016-02-24 19:28             ` Peter Lieven [this message]
2016-02-24 21:17               ` Jeff Cody
2016-02-24 19:29           ` Peter Lieven
2016-02-24  0:47 ` [Qemu-devel] [PATCH 4/4] block/vpc: add tests for image creation force_size parameter Jeff Cody

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=56CE0454.5050202@kamp.de \
    --to=pl@kamp.de \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).