[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] aio: add missing aio_notify() to aio_enable_ext
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] aio: add missing aio_notify() to aio_enable_external() |
Date: |
Fri, 5 May 2017 11:03:19 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Thu, May 04, 2017 at 06:54:58PM +0800, Fam Zheng wrote:
> On Thu, 05/04 12:36, Paolo Bonzini wrote:
> > On 04/05/2017 12:23, Stefan Hajnoczi wrote:
> > > diff --git a/include/block/aio.h b/include/block/aio.h
> > > index 406e323..5294b04 100644
> > > --- a/include/block/aio.h
> > > +++ b/include/block/aio.h
> > > @@ -456,6 +456,7 @@ static inline void aio_enable_external(AioContext
> > > *ctx)
> > > {
> > > assert(ctx->external_disable_cnt > 0);
> > > atomic_dec(&ctx->external_disable_cnt);
>
> This can be changed to atomic_fetch_dec and only call aio_notify if it
> returned
> 1, which is cleaner.
Nice idea. Will send v2.
Stefan
signature.asc
Description: PGP signature