qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH 02/19] block: Use bdrv_do_drain_beg


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [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>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]