[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block: drop unused bdrv_co_drain() API
From: |
Alberto Faria |
Subject: |
Re: [PATCH] block: drop unused bdrv_co_drain() API |
Date: |
Mon, 23 May 2022 20:39:52 +0100 |
On Sat, May 21, 2022 at 1:27 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> bdrv_co_drain() has not been used since commit 9a0cec664eef ("mirror:
> use bdrv_drained_begin/bdrv_drained_end") in 2016. Remove it so there
> are fewer drain scenarios to worry about.
>
> Use bdrv_drained_begin()/bdrv_drained_end() instead. They are "mixed"
> functions that can be called from coroutine context. Unlike
> bdrv_co_drain(), these functions provide control of the length of the
> drained section, which is usually the right thing.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Faria <afaria@redhat.com>