[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 02/19] block: Use bdrv_do_drain_begin/end in bdr
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH 02/19] block: Use bdrv_do_drain_begin/end in bdrv_drain_all() |
Date: |
Fri, 20 Apr 2018 15:07:54 +0800 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, Apr 11, 2018 at 06:39:23PM +0200, Kevin Wolf wrote:
> bdrv_do_drain_begin/end() implement already everything that
> bdrv_drain_all_begin/end() need and currently still do manually: Disable
> external events, call parent drain callbacks, call block driver
> callbacks.
>
> It also does two more things:
>
> The first is incrementing bs->quiesce_counter. bdrv_drain_all() already
> stood out in the test case by behaving different from the other drain
> variants. Adding this is not only safe, but in fact a bug fix.
>
> The second is calling bdrv_drain_recurse(). We already do that later in
> the same function in a loop, so basically doing an early first iteration
> doesn't hurt.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/io.c | 10 ++--------
> tests/test-bdrv-drain.c | 14 ++++----------
> 2 files changed, 6 insertions(+), 18 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-block] [PATCH 00/19] Drain fixes and cleanups, part 3, Kevin Wolf, 2018/04/11
- [Qemu-block] [PATCH 03/19] block: Remove 'recursive' parameter from bdrv_drain_invoke(), Kevin Wolf, 2018/04/11
- [Qemu-block] [PATCH 02/19] block: Use bdrv_do_drain_begin/end in bdrv_drain_all(), Kevin Wolf, 2018/04/11
- Re: [Qemu-block] [PATCH 02/19] block: Use bdrv_do_drain_begin/end in bdrv_drain_all(),
Stefan Hajnoczi <=
- [Qemu-block] [PATCH 05/19] tests/test-bdrv-drain: bdrv_drain_all() works in coroutines now, Kevin Wolf, 2018/04/11
- [Qemu-block] [PATCH 08/19] block: Remove bdrv_drain_recurse(), Kevin Wolf, 2018/04/11
- [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Kevin Wolf, 2018/04/11