diff options
| author | Vladimir Sementsov-Ogievskiy | 2020-09-24 20:54:09 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2020-10-05 10:35:52 +0200 |
| commit | f9e694cb32403c7ebe8f8cc6949da47896afd561 (patch) | |
| tree | 1508148b617ea85cb8162143141b8d2a21fa6b5f /include | |
| parent | block: return error-code from bdrv_invalidate_cache (diff) | |
| download | qemu-f9e694cb32403c7ebe8f8cc6949da47896afd561.tar.gz qemu-f9e694cb32403c7ebe8f8cc6949da47896afd561.tar.xz 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 'include')
0 files changed, 0 insertions, 0 deletions
