[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_begin |
Date: |
Tue, 18 Apr 2017 16:36:25 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Tue, 04/18 10:18, Paolo Bonzini wrote:
>
>
> On 17/04/2017 10:27, Fam Zheng wrote:
> > At this point it's even unclear to me what should be the plan for 2.9. v1
> > IMO
> > was the least intrusive, but didn't cover bdrv_drain_all_begin. v2 has this
> > controversial "aio_poll(ctx_, false)",
>
> v1 has it too:
>
> - bdrv_drain_recurse(bs);
> + while (true) {
> + if (!bdrv_drain_recurse(bs) &&
> + !aio_poll(bdrv_get_aio_context(bs), false)) {
> + break;
> + }
> + }
Yes you are right.
On the other hand, the fact that in v2 I had to add bdrv_ref/bdrv_unref around
the recursive bdrv_drain_recurse() call makes me worry a little - I assume the
same problem exists in v1 and is just latent. So maybe merging v2 is better.
>
> I don't have any particular preference. Both patches are self contained
> and easy to revert when the underlying root cause is fixed.
>
Fam