qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] block-backend: add drained_poll


From: Eric Blake
Subject: Re: [PATCH 1/2] block-backend: add drained_poll
Date: Tue, 1 Jun 2021 16:24:29 -0500
User-agent: NeoMutt/20210205

On Tue, Jun 01, 2021 at 05:59:10PM +0200, Kevin Wolf wrote:
> > +++ b/block/block-backend.c
> > @@ -2393,8 +2393,13 @@ static void blk_root_drained_begin(BdrvChild *child)
> >  static bool blk_root_drained_poll(BdrvChild *child)
> >  {
> >      BlockBackend *blk = child->opaque;
> > +    int ret = 0;
> 
> It's really a bool.
> 
> >      assert(blk->quiesce_counter);
> > -    return !!blk->in_flight;
> > +
> > +    if (blk->dev_ops && blk->dev_ops->drained_poll) {
> > +        ret = blk->dev_ops->drained_poll(blk->dev_opaque);
> > +    }
> > +    return ret || !!blk->in_flight;
> >  }
> 
> Doesn't make a difference for correctness, of course, so whether you
> change it or not:
> 
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>

Likewise, with that cosmetic change,
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




reply via email to

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