From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/9] block: replace .bdrv_is_allocated() with .bdrv_co_is_allocated()
Date: Wed, 23 Nov 2011 15:22:35 +0100 [thread overview]
Message-ID: <4ECD01AB.7090508@redhat.com> (raw)
In-Reply-To: <1321274666-14041-1-git-send-email-stefanha@linux.vnet.ibm.com>
Am 14.11.2011 13:44, schrieb Stefan Hajnoczi:
> The bdrv_is_allocated() interface is not suitable for use while the VM is
> running. It is a synchronous interface so it may block the running VM for
> arbitrary amounts of time. It also assumes it is the only block driver
> operation and there is a risk that internal state could be corrupted if
> asynchronous I/O is currently pending.
>
> This patch series refactors the block layer so that the bdrv_is_allocated()
> operation is performed internally in coroutine context. We can then introduce
> a new public bdrv_co_is_allocated() function that is suitable for use when the
> VM is running.
>
> Making these changes without breaking git bisect means we need to first
> introduce BlockDriver .bdrv_co_is_allocated() and add wrapper code into
> bdrv_is_allocated() so existing callers can use converted BlockDrivers.
>
> After converting all block drivers there are no .bdrv_is_allocated() functions
> left and the interface can be removed from BlockDriver.
>
> Finally, we can add the new public bdrv_co_is_allocated() public interface and
> turn the old bdrv_is_allocated() into a wrapper.
>
> This series is a prerequisite for copy-on-read, which needs to check whether
> sectors are allocated while the VM is running.
>
> v2:
> * Rebased on kevin/block and resolved conflicts
>
> Stefan Hajnoczi (9):
> block: use public bdrv_is_allocated() interface
> block: add .bdrv_co_is_allocated()
> qed: convert to .bdrv_co_is_allocated()
> block: convert qcow2, qcow2, and vmdk to .bdrv_co_is_allocated()
> vvfat: convert to .bdrv_co_is_allocated()
> vdi: convert to .bdrv_co_is_allocated()
> cow: convert to .bdrv_co_is_allocated()
> block: drop .bdrv_is_allocated() interface
> block: add bdrv_co_is_allocated() interface
>
> block.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
> block.h | 2 +
> block/cow.c | 8 +++---
> block/qcow.c | 8 ++++--
> block/qcow2.c | 13 +++++++----
> block/qed.c | 15 ++++++++++---
> block/vdi.c | 6 ++--
> block/vmdk.c | 8 ++++--
> block/vvfat.c | 4 +-
> block_int.h | 4 +-
> 10 files changed, 94 insertions(+), 32 deletions(-)
Thanks, applied all to the block branch (for 1.1)
Kevin
prev parent reply other threads:[~2011-11-23 14:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 12:44 [Qemu-devel] [PATCH v2 0/9] block: replace .bdrv_is_allocated() with .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 1/9] block: use public bdrv_is_allocated() interface Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 2/9] block: add .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 3/9] qed: convert to .bdrv_co_is_allocated() Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 4/9] block: convert qcow2, qcow2, and vmdk " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 5/9] vvfat: convert " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 6/9] vdi: " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 7/9] cow: " Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 8/9] block: drop .bdrv_is_allocated() interface Stefan Hajnoczi
2011-11-14 12:44 ` [Qemu-devel] [PATCH v2 9/9] block: add bdrv_co_is_allocated() interface Stefan Hajnoczi
2011-11-23 14:22 ` 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=4ECD01AB.7090508@redhat.com \
--to=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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.