[Qemu-devel] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn

Marc-André Lureau posted 35 patches 8 years, 7 months ago
There is a newer version of this series
[Qemu-devel] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn
Posted by Marc-André Lureau 8 years, 7 months ago
Called from coroutine.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/block/block_int.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/block/block_int.h b/include/block/block_int.h
index 93eb2a9528..a183c72b7c 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -126,7 +126,7 @@ struct BlockDriver {
     int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags,
                           Error **errp);
     void (*bdrv_close)(BlockDriverState *bs);
-    int (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp);
+    int coroutine_fn (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp);
     int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
     int (*bdrv_make_empty)(BlockDriverState *bs);
 
@@ -267,7 +267,7 @@ struct BlockDriver {
                               BlockDriverAmendStatusCB *status_cb,
                               void *cb_opaque);
 
-    void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event);
+    void coroutine_fn (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event);
 
     /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */
     int (*bdrv_debug_breakpoint)(BlockDriverState *bs, const char *event,
-- 
2.13.1.395.gf7b71de06


Re: [Qemu-devel] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn
Posted by Stefan Hajnoczi 8 years, 7 months ago
On Wed, Jul 05, 2017 at 12:03:20AM +0200, Marc-André Lureau wrote:
> Called from coroutine.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/block/block_int.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>