[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn |
Date: |
Fri, 11 Nov 2022 12:14:54 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
Am 08/11/2022 um 13:37 schrieb Kevin Wolf:
> Polling during bdrv_drained_end() can be problematic (and in the future,
> we may get cases for bdrv_drained_begin() where polling is forbidden,
> and we don't care about already in-flight requests, but just want to
> prevent new requests from arriving).
>
> The .bdrv_drained_begin/end callbacks running in a coroutine is the only
> reason why we have to do this polling, so make them non-coroutine
> callbacks again. None of the callers actually yield any more.
>
> This means that bdrv_drained_end() effectively doesn't poll any more,
> even if AIO_WAIT_WHILE() loops are still there (their condition is false
> from the beginning). This is generally not a problem, but in
> test-bdrv-drain, some additional explicit aio_poll() calls need to be
> added because the test case wants to verify the final state after BHs
> have executed.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
- Re: [PATCH 02/13] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end(), (continued)
- [PATCH 04/13] block: Remove drained_end_counter, Kevin Wolf, 2022/11/08
- [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn, Kevin Wolf, 2022/11/08
- [PATCH 05/13] block: Inline bdrv_drain_invoke(), Kevin Wolf, 2022/11/08
- [PATCH 07/13] block: Don't use subtree drains in bdrv_drop_intermediate(), Kevin Wolf, 2022/11/08
- [PATCH 06/13] block: Drain invidual nodes during reopen, Kevin Wolf, 2022/11/08