All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-img rebase: Fix for undersized backing files
Date: Wed, 07 Dec 2011 13:02:30 +0100	[thread overview]
Message-ID: <4EDF55D6.9030007@redhat.com> (raw)
In-Reply-To: <CAJSP0QUHqThXXu8rt=3y4A-6Gmqht1xRETABENVkfaWT5FB0Sw@mail.gmail.com>

Am 07.12.2011 12:50, schrieb Stefan Hajnoczi:
> On Wed, Dec 7, 2011 at 11:45 AM, Kevin Wolf <kwolf@redhat.com> wrote:
>> Backing files may be smaller than the corresponding COW file. When
>> reading directly from the backing file, qemu-img rebase must consider
>> this and assume zero sectors after the end of backing files.
>>
>> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>> ---
>>  qemu-img.c |   42 +++++++++++++++++++++++++++++++++---------
>>  1 files changed, 33 insertions(+), 9 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> 
> It almost feels like we want a bdrv_read() variation that does the
> zeroing beyond end of image instead of duplicating this.

Almost. If we have a third user, it's probably worth it.

Actually, if we make a bdrv_co_readv_backing() instead of a synchronous
one, qcow2 would be the third user (and maybe VMDK could use it, too).
That would require moving qemu-img into a coroutine first, which I think
you wanted to do anyway?

Kevin

  reply	other threads:[~2011-12-07 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 11:45 [Qemu-devel] [PATCH] qemu-img rebase: Fix for undersized backing files Kevin Wolf
2011-12-07 11:50 ` Stefan Hajnoczi
2011-12-07 12:02   ` Kevin Wolf [this message]
2011-12-07 12:06     ` Stefan Hajnoczi
2011-12-07 12:15       ` Kevin Wolf

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=4EDF55D6.9030007@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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.