qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.canc


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async
Date: Fri, 5 Sep 2014 18:55:51 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, 09/04 17:21, Benoît Canet wrote:
> The Wednesday 03 Sep 2014 à 19:23:39 (+0800), Fam Zheng wrote :
> > All the difference is that the old .cancel doesn't call cb, but
> > .cancel_async does.
> > 
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  block.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/block.c b/block.c
> > index 4aa1bd7..b7253af 100644
> > --- a/block.c
> > +++ b/block.c
> > @@ -4679,6 +4679,9 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB 
> > *blockacb)
> >  {
> >      BlockDriverAIOCBSync *acb =
> >          container_of(blockacb, BlockDriverAIOCBSync, common);
> > +
> > +    acb->ret = -ECANCELED;
> > +    acb->common.cb(acb->common.opaque, acb->ret);
> >      qemu_bh_delete(acb->bh);
> >      acb->bh = NULL;
> >      qemu_aio_release(acb);
> > @@ -4686,7 +4689,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB 
> > *blockacb)
> >  
> >  static const AIOCBInfo bdrv_em_aiocb_info = {
> >      .aiocb_size         = sizeof(BlockDriverAIOCBSync),
> > -    .cancel             = bdrv_aio_cancel_em,
> > +    .cancel_async       = bdrv_aio_cancel_em,
> >  };
> 
> Note from an AIO noob. Could we explain somewhere in the block layer what the 
> _em suffix means ?

I didn't write these functions but I think it means "emulation".

Fam



reply via email to

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