[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/19] block: Allow graph changes in subtree dra
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 16/19] block: Allow graph changes in subtree drained section |
Date: |
Wed, 20 Dec 2017 11:51:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 20/12/2017 11:34, Kevin Wolf wrote:
> .inherit_options = bdrv_inherited_options,
> .drained_begin = bdrv_child_cb_drained_begin,
> .drained_end = bdrv_child_cb_drained_end,
> + .attach = bdrv_child_cb_attach,
> + .detach = bdrv_child_cb_detach,
> .inactivate = bdrv_child_cb_inactivate,
> };
>
> @@ -911,6 +933,8 @@ const BdrvChildRole child_format = {
> .inherit_options = bdrv_inherited_fmt_options,
> .drained_begin = bdrv_child_cb_drained_begin,
> .drained_end = bdrv_child_cb_drained_end,
> + .attach = bdrv_child_cb_attach,
> + .detach = bdrv_child_cb_detach,
> .inactivate = bdrv_child_cb_inactivate,
Is there any case of a BdrvChildRole that doesn't want these callbacks?
Maybe the functions should be called after ->attach and before ->detach
(e.g. bdrv_{,un}apply_subtree_drain), rather than modifying the
BdrvChildRole implementations.
Then they can be put in block/io.c, and bdrv_do_drained_* can remain
static. (I would also consider extracting block/drain.c, but it is
painful to do it now that you have this nice series---so let's do it after).
Paolo
- [Qemu-devel] [PATCH 06/19] blockjob: Pause job on draining any job BDS, (continued)
- [Qemu-devel] [PATCH 06/19] blockjob: Pause job on draining any job BDS, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 10/19] test-bdrv-drain: Test nested drain sections, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 11/19] block: Don't notify parents in drain call chain, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 12/19] block: Add bdrv_subtree_drained_begin/end(), Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 14/19] test-bdrv-drain: Test behaviour in coroutine context, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 13/19] test-bdrv-drain: Tests for bdrv_subtree_drain, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 17/19] test-bdrv-drain: Test graph changes in drained section, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 15/19] test-bdrv-drain: Recursive draining with multiple parents, Kevin Wolf, 2017/12/20
- [Qemu-devel] [PATCH 16/19] block: Allow graph changes in subtree drained section, Kevin Wolf, 2017/12/20
- Re: [Qemu-devel] [PATCH 16/19] block: Allow graph changes in subtree drained section,
Paolo Bonzini <=
[Qemu-devel] [PATCH 18/19] commit: Simplify reopen of base, Kevin Wolf, 2017/12/20
[Qemu-devel] [PATCH 19/19] block: Keep nodes drained between reopen_queue/multiple, Kevin Wolf, 2017/12/20
Re: [Qemu-devel] [PATCH 00/19] Drain fixes and cleanups, part 2, Paolo Bonzini, 2017/12/20