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 <kw...@redhat.com> > --- > block/io.c | 10 ++-------- > tests/test-bdrv-drain.c | 14 ++++---------- > 2 files changed, 6 insertions(+), 18 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature