[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are corouti
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn |
Date: |
Wed, 5 Jul 2017 10:21:37 -0400 (EDT) |
----- Original Message -----
> On 05/07/2017 00:03, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> > include/block/block_int.h | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/block/block_int.h b/include/block/block_int.h
> > index 15fa602150..93eb2a9528 100644
> > --- a/include/block/block_int.h
> > +++ b/include/block/block_int.h
> > @@ -133,15 +133,15 @@ struct BlockDriver {
> > void (*bdrv_refresh_filename)(BlockDriverState *bs, QDict *options);
> >
> > /* aio */
> > - BlockAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs,
> > + BlockAIOCB * coroutine_fn (*bdrv_aio_readv)(BlockDriverState *bs,
> > int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
> > BlockCompletionFunc *cb, void *opaque);
> > - BlockAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs,
> > + BlockAIOCB * coroutine_fn (*bdrv_aio_writev)(BlockDriverState *bs,
> > int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
> > BlockCompletionFunc *cb, void *opaque);
> > - BlockAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs,
> > + BlockAIOCB * coroutine_fn (*bdrv_aio_flush)(BlockDriverState *bs,
> > BlockCompletionFunc *cb, void *opaque);
> > - BlockAIOCB *(*bdrv_aio_pdiscard)(BlockDriverState *bs,
> > + BlockAIOCB * coroutine_fn (*bdrv_aio_pdiscard)(BlockDriverState *bs,
> > int64_t offset, int bytes,
> > BlockCompletionFunc *cb, void *opaque);
> >
> > @@ -247,7 +247,7 @@ struct BlockDriver {
> > void (*bdrv_lock_medium)(BlockDriverState *bs, bool locked);
> >
> > /* to control generic scsi devices */
> > - BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs,
> > + BlockAIOCB * coroutine_fn (*bdrv_aio_ioctl)(BlockDriverState *bs,
> > unsigned long int req, void *buf,
> > BlockCompletionFunc *cb, void *opaque);
> > int coroutine_fn (*bdrv_co_ioctl)(BlockDriverState *bs,
> >
>
>
> They are, but it's an implementation detail. Why is this patch necessary?
I didn't think this would be controversial :) well, the checks I added to clang
verify function pointer share the coroutine attribute.
The function themself are/need to be coroutine_fn (as they will call
coroutine_fn too)
- Re: [Qemu-devel] [PATCH 04/35] coroutine: remove coroutine_fn from qemu_coroutine_self(), (continued)
[Qemu-devel] [PATCH 05/35] coroutine: remove coroutine_fn from qemu_co_queue_run_restart(), Marc-André Lureau, 2017/07/04
[Qemu-devel] [PATCH 06/35] coroutine: mark CoRwLock coroutine_fn, Marc-André Lureau, 2017/07/04
[Qemu-devel] [PATCH 07/35] blockjob: mark coroutine_fn, Marc-André Lureau, 2017/07/04
[Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Marc-André Lureau, 2017/07/04
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Paolo Bonzini, 2017/07/05
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Paolo Bonzini, 2017/07/05
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Marc-André Lureau, 2017/07/05
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Paolo Bonzini, 2017/07/05
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Marc-André Lureau, 2017/07/05
- Re: [Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn, Paolo Bonzini, 2017/07/05
[Qemu-devel] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn, Marc-André Lureau, 2017/07/04
[Qemu-devel] [PATCH 11/35] qcow2: mark coroutine_fn, Marc-André Lureau, 2017/07/04
[Qemu-devel] [PATCH 10/35] vmdk: mark coroutine_fn, Marc-André Lureau, 2017/07/04