From: Stefan Hajnoczi <stefanha@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: qemu-trivial@nongnu.org, Stefan Weil <weil@mail.berlios.de>,
qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] Teach block/vdi about "discarded" (no longer allocated) blocks
Date: Thu, 27 Oct 2011 08:05:36 +0100 [thread overview]
Message-ID: <20111027070536.GA32265@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1319658678-18355-1-git-send-email-sunshine@sunshineco.com>
On Wed, Oct 26, 2011 at 03:51:18PM -0400, Eric Sunshine wrote:
> An entry in the VDI block map will hold an offset to the actual block if
> the block is allocated, or one of two specially-interpreted values if
> not allocated. Using VirtualBox terminology, value VDI_IMAGE_BLOCK_FREE
> (0xffffffff) represents a never-allocated block (semantically arbitrary
> content). VDI_IMAGE_BLOCK_ZERO (0xfffffffe) represents a "discarded"
> block (semantically zero-filled). block/vdi knows only about
> VDI_IMAGE_BLOCK_FREE. Teach it about VDI_IMAGE_BLOCK_ZERO.
>
> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
> ---
>
> Without this patch, "qemu-image check" on a VDI image containing
> discarded blocks reports errors such as:
>
> ERROR: block index 3434 too large, is 4294967294
>
> Decimal 4294967294 is 0xfffffffe. Worse, "qemu-image convert" or direct
> access of the VDI image from qemu involves reads and writes of blocks at
> the bogus block offset 4294967294 within the image file.
>
> Cc: Stefan Weil <weil@mail.berlios.de>
> Cc: Kevin Wolf <kwolf@redhat.com>
>
> block/vdi.c | 23 ++++++++++++++---------
> 1 files changed, 14 insertions(+), 9 deletions(-)
Good to see this improvement. I recently talked to a CernVM developer
who had issues with vdi images. This may fix the issue they were
seeing.
I think Kevin should take this through the block tree. I won't apply it
to trivial-patches.
Stefan
next prev parent reply other threads:[~2011-10-27 8:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 19:51 [Qemu-devel] [PATCH] Teach block/vdi about "discarded" (no longer allocated) blocks Eric Sunshine
2011-10-26 20:24 ` Stefan Weil
2011-10-26 20:54 ` Eric Sunshine
2011-10-27 7:05 ` Stefan Hajnoczi [this message]
2011-10-27 8:53 ` Kevin Wolf
2011-10-27 16:12 ` Stefan Weil
2011-10-27 16:20 ` Eric Sunshine
2011-10-28 8:00 ` Kevin Wolf
2011-10-28 8:15 ` Eric Sunshine
2011-10-28 9:22 ` Kevin Wolf
2011-10-28 14:33 ` Stefan Weil
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=20111027070536.GA32265@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sunshine@sunshineco.com \
--cc=weil@mail.berlios.de \
/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).