summary refs log tree commit diff stats
path: root/scripts/block-coroutine-wrapper.py
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-09-24 21:54:09 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2020-10-05 09:35:52 +0100
commitf9e694cb32403c7ebe8f8cc6949da47896afd561 (patch)
tree1508148b617ea85cb8162143141b8d2a21fa6b5f /scripts/block-coroutine-wrapper.py
parent5416645fcf82a6cf520a83c82b577137058aaf32 (diff)
downloadfocaccia-qemu-f9e694cb32403c7ebe8f8cc6949da47896afd561.tar.gz
focaccia-qemu-f9e694cb32403c7ebe8f8cc6949da47896afd561.zip
block/io: refactor coroutine wrappers
Most of our coroutine wrappers already follow this convention:

We have 'coroutine_fn bdrv_co_<something>(<normal argument list>)' as
the core function, and a wrapper 'bdrv_<something>(<same argument
list>)' which does parameter packing and calls bdrv_run_co().

The only outsiders are the bdrv_prwv_co and
bdrv_common_block_status_above wrappers. Let's refactor them to behave
as the others, it simplifies further conversion of coroutine wrappers.

This patch adds an indirection layer, but it will be compensated by
a further commit, which will drop bdrv_co_prwv together with the
is_write logic, to keep the read and write paths separate.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200924185414.28642-3-vsementsov@virtuozzo.com>
Diffstat (limited to 'scripts/block-coroutine-wrapper.py')
0 files changed, 0 insertions, 0 deletions