[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 00/15] block: Simplify drain
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 00/15] block: Simplify drain |
Date: |
Mon, 28 Nov 2022 14:00:09 +0100 |
Am 18.11.2022 um 18:40 hat Kevin Wolf geschrieben:
> I'm aware that exactly nobody has been looking forward to a series with
> this title, but it has to be. The way drain works means that we need to
> poll in bdrv_replace_child_noperm() and that makes things rather messy
> with Emanuele's multiqueue work because you must not poll while you hold
> the graph lock.
>
> The other reason why it has to be is that drain is way too complex and
> there are too many different cases. Some simplification like this will
> hopefully make it considerably more maintainable. The diffstat probably
> tells something, too.
>
> There are roughly speaking three parts in this series:
>
> 1. Make BlockDriver.bdrv_drained_begin/end() non-coroutine_fn again,
> which allows us to not poll on bdrv_drained_end() any more.
>
> 2. Remove subtree drains. They are a considerable complication in the
> whole drain machinery (in particular, they require polling in the
> BdrvChildClass.attach/detach() callbacks that are called during
> bdrv_replace_child_noperm()) and none of their users actually has a
> good reason to use them.
>
> 3. Finally get rid of polling in bdrv_replace_child_noperm() by
> requiring that the child is already drained by the caller and calling
> callbacks only once and not again for every nested drain section.
>
> If necessary, a prefix of this series can be merged that covers only the
> first or the first two parts and it would still make sense.
Thanks for the review, applied to block-next.
Kevin
- [PATCH v2 13/15] block: Drop out of coroutine in bdrv_do_drained_begin_quiesce(), (continued)
- [PATCH v2 13/15] block: Drop out of coroutine in bdrv_do_drained_begin_quiesce(), Kevin Wolf, 2022/11/18
- [PATCH v2 09/15] stream: Replace subtree drain with a single node drain, Kevin Wolf, 2022/11/18
- [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm(), Kevin Wolf, 2022/11/18
- [PATCH v2 10/15] block: Remove subtree drains, Kevin Wolf, 2022/11/18
- [PATCH v2 15/15] block: Remove poll parameter from bdrv_parent_drained_begin_single(), Kevin Wolf, 2022/11/18
- Re: [PATCH v2 00/15] block: Simplify drain, Hanna Reitz, 2022/11/24
- Re: [PATCH v2 00/15] block: Simplify drain,
Kevin Wolf <=