[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 3/4] block: Fix reconfiguring graph
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 3/4] block: Fix reconfiguring graph with drained nodes |
Date: |
Mon, 23 May 2016 15:17:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 05/23/2016 10:55 AM, Kevin Wolf wrote:
> When changing the BlockDriverState that a BdrvChild points to while the
> node is currently drained, we must call the .drained_end() parent
> callback. Conversely, when this means attaching a new node that is
> already drained, we need to call .drained_begin().
>
> bdrv_root_attach_child() takes now an opaque parameter, which is needed
> because the callbacks must also be called if we're attaching a new child
> to the BlockBackend when the root node is already drained, and they need
> a way to identify the BlockBackend. Previously, child->opaque was set
> too late and the callbacks would still see it as NULL.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 18 ++++++++++++++----
> block/block-backend.c | 9 +++++----
> include/block/block_int.h | 3 ++-
> 3 files changed, 21 insertions(+), 9 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 0/4] block: BdrvChildRole.drained_begin/end fixes, Kevin Wolf, 2016/05/23
- [Qemu-block] [PATCH 2/4] block: Make bdrv_drain() use bdrv_drained_begin/end(), Kevin Wolf, 2016/05/23
- [Qemu-block] [PATCH 3/4] block: Fix reconfiguring graph with drained nodes, Kevin Wolf, 2016/05/23
- Re: [Qemu-block] [Qemu-devel] [PATCH 3/4] block: Fix reconfiguring graph with drained nodes,
Eric Blake <=
- [Qemu-block] [PATCH 1/4] block: Introduce bdrv_replace_child(), Kevin Wolf, 2016/05/23
- [Qemu-block] [PATCH 4/4] block: Propagate .drained_begin/end callbacks, Kevin Wolf, 2016/05/23
- Re: [Qemu-block] [PATCH 0/4] block: BdrvChildRole.drained_begin/end fixes, Fam Zheng, 2016/05/23
- Re: [Qemu-block] [PATCH 0/4] block: BdrvChildRole.drained_begin/end fixes, Kevin Wolf, 2016/05/24