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:15:51 +0100 [thread overview]
Message-ID: <4EDF58F7.3090404@redhat.com> (raw)
In-Reply-To: <CAJSP0QXkXh3nd+689-mL-YMhN1MNQT-5D0AadsHCXTbv6rPfGQ@mail.gmail.com>
Am 07.12.2011 13:06, schrieb Stefan Hajnoczi:
> On Wed, Dec 7, 2011 at 12:02 PM, Kevin Wolf <kwolf@redhat.com> wrote:
>> 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?
>
> If we can make qemu-img the last user of synchronous interfaces then
> it would be nice to convert it. Right now I'm happy that we're
> solidifying coroutines and converting synchronous hardware emulation,
> hopefully we'll get to the point where there is no real reason to keep
> the synchronous API around anymore.
The point is, if I were to introduce a bdrv_co_readv_backing() function,
I certainly wouldn't like to add all the bdrv_(aio_)read/write emulation
code for it, too.
Kevin
prev parent reply other threads:[~2011-12-07 12:12 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
2011-12-07 12:06 ` Stefan Hajnoczi
2011-12-07 12:15 ` Kevin Wolf [this message]
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=4EDF58F7.3090404@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.