All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: amulya.lokesha@emc.com, qemu-devel@nongnu.org,
	stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init
Date: Fri, 5 Dec 2014 09:34:04 -0500	[thread overview]
Message-ID: <20141205143404.GA2433@localhost.localdomain> (raw)
In-Reply-To: <20141205114922.GC6040@noname.str.redhat.com>

On Fri, Dec 05, 2014 at 12:49:22PM +0100, Kevin Wolf wrote:
> Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben:
> > Like for most other image formats, vhdx images read as all zero in qemu
> > after their creation (we're taking advantage from the fact that qemu has
> > just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means
> > undefined rather than zeroed according to the spec).
> > 
> > This fixes that 'qemu-img convert' to vhdx fully populates the image.
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> 
> Jeff, another thing that Max found while we looked at the spec is that
> the 1.0 spec defines PAYLOAD_BLOCK_UNMAPPED as 3, but we define it as 5.
> It appears that the 0.95 spec actually had it that way.
> 
> Should we handle both 3 and 5 as unmapped?
> 

Wow - you are right, I checked the 1.0 spec change history. Since one
of the valid actions is to read zeros for PAYLOAD_BLOCK_UNMAPPED, it
would seem safe to do that for a technically undefined state of '5',
especially since that will maintain backwards compatibility of
0.95-spec images.  So I think 'yes'.

  reply	other threads:[~2014-12-05 14:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05 10:26 [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init Kevin Wolf
2014-12-05 11:06 ` Max Reitz
2014-12-05 11:07 ` Kevin Wolf
2014-12-05 14:35   ` Jeff Cody
2014-12-05 11:49 ` Kevin Wolf
2014-12-05 14:34   ` Jeff Cody [this message]
2015-10-23 15:32 ` Stefan Hajnoczi
2015-10-23 16:00   ` Kevin Wolf
2015-10-26 10:43     ` Stefan Hajnoczi

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=20141205143404.GA2433@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=amulya.lokesha@emc.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.