diff mbox series

[v5,4/4] block: Mark 'block_resize' as coroutine

Message ID 20200218154036.28562-5-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show
Series qmp: Optionally run handlers in coroutines | expand

Commit Message

Kevin Wolf Feb. 18, 2020, 3:40 p.m. UTC
block_resize is safe to run in a coroutine, and it does some I/O that
could potentially take quite some time, so use it as an example for the
new 'coroutine': true annotation in the QAPI schema.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/block-core.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 37d7ea7295..077b721d01 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1344,7 +1344,8 @@ 
 { 'command': 'block_resize',
   'data': { '*device': 'str',
             '*node-name': 'str',
-            'size': 'int' } }
+            'size': 'int' },
+  'coroutine': true }
 
 ##
 # @NewImageMode: