1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef BLOCK_COROUTINES_INT_H
26#define BLOCK_COROUTINES_INT_H
27
28#include "block/block_int.h"
29
30
31#include "sysemu/block-backend.h"
32
33int coroutine_fn bdrv_co_check(BlockDriverState *bs,
34 BdrvCheckResult *res, BdrvCheckMode fix);
35int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp);
36
37int generated_co_wrapper
38bdrv_preadv(BdrvChild *child, int64_t offset, unsigned int bytes,
39 QEMUIOVector *qiov, BdrvRequestFlags flags);
40int generated_co_wrapper
41bdrv_pwritev(BdrvChild *child, int64_t offset, unsigned int bytes,
42 QEMUIOVector *qiov, BdrvRequestFlags flags);
43
44int coroutine_fn
45bdrv_co_common_block_status_above(BlockDriverState *bs,
46 BlockDriverState *base,
47 bool include_base,
48 bool want_zero,
49 int64_t offset,
50 int64_t bytes,
51 int64_t *pnum,
52 int64_t *map,
53 BlockDriverState **file,
54 int *depth);
55int generated_co_wrapper
56bdrv_common_block_status_above(BlockDriverState *bs,
57 BlockDriverState *base,
58 bool include_base,
59 bool want_zero,
60 int64_t offset,
61 int64_t bytes,
62 int64_t *pnum,
63 int64_t *map,
64 BlockDriverState **file,
65 int *depth);
66
67int coroutine_fn bdrv_co_readv_vmstate(BlockDriverState *bs,
68 QEMUIOVector *qiov, int64_t pos);
69int coroutine_fn bdrv_co_writev_vmstate(BlockDriverState *bs,
70 QEMUIOVector *qiov, int64_t pos);
71
72int generated_co_wrapper
73nbd_do_establish_connection(BlockDriverState *bs, Error **errp);
74int coroutine_fn
75nbd_co_do_establish_connection(BlockDriverState *bs, Error **errp);
76
77
78int generated_co_wrapper
79blk_do_preadv(BlockBackend *blk, int64_t offset, int64_t bytes,
80 QEMUIOVector *qiov, BdrvRequestFlags flags);
81int coroutine_fn
82blk_co_do_preadv(BlockBackend *blk, int64_t offset, int64_t bytes,
83 QEMUIOVector *qiov, BdrvRequestFlags flags);
84
85
86int generated_co_wrapper
87blk_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
88 QEMUIOVector *qiov, size_t qiov_offset,
89 BdrvRequestFlags flags);
90int coroutine_fn
91blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
92 QEMUIOVector *qiov, size_t qiov_offset,
93 BdrvRequestFlags flags);
94
95int generated_co_wrapper
96blk_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
97int coroutine_fn
98blk_co_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
99
100int generated_co_wrapper
101blk_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes);
102int coroutine_fn
103blk_co_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes);
104
105int generated_co_wrapper blk_do_flush(BlockBackend *blk);
106int coroutine_fn blk_co_do_flush(BlockBackend *blk);
107
108#endif
109