mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
block: declare some coroutine functions in block/coroutines.h
We are going to keep coroutine-wrappers code (structure-packing parameters, BDRV_POLL wrapper functions) in separate auto-generated files. So, we'll need a header with declaration of original _co_ functions, for those which are static now. As well, we'll need declarations for wrapper functions. Do these declarations now, as a preparation step. 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-4-vsementsov@virtuozzo.com>
This commit is contained in:
parent
f9e694cb32
commit
21c2283ebc
3 changed files with 88 additions and 21 deletions
8
block.c
8
block.c
|
@ -48,6 +48,7 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/id.h"
|
||||
#include "block/coroutines.h"
|
||||
|
||||
#ifdef CONFIG_BSD
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -4676,8 +4677,8 @@ static void bdrv_delete(BlockDriverState *bs)
|
|||
* free of errors) or -errno when an internal error occurred. The results of the
|
||||
* check are stored in res.
|
||||
*/
|
||||
static int coroutine_fn bdrv_co_check(BlockDriverState *bs,
|
||||
BdrvCheckResult *res, BdrvCheckMode fix)
|
||||
int coroutine_fn bdrv_co_check(BlockDriverState *bs,
|
||||
BdrvCheckResult *res, BdrvCheckMode fix)
|
||||
{
|
||||
if (bs->drv == NULL) {
|
||||
return -ENOMEDIUM;
|
||||
|
@ -5781,8 +5782,7 @@ void bdrv_init_with_whitelist(void)
|
|||
bdrv_init();
|
||||
}
|
||||
|
||||
static int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs,
|
||||
Error **errp)
|
||||
int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
BdrvChild *child, *parent;
|
||||
uint64_t perm, shared_perm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue