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
33
34
35
36
37
38
39
40int coroutine_fn bdrv_co_check(BlockDriverState *bs,
41 BdrvCheckResult *res, BdrvCheckMode fix);
42int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp);
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);
55
56int coroutine_fn bdrv_co_readv_vmstate(BlockDriverState *bs,
57 QEMUIOVector *qiov, int64_t pos);
58int coroutine_fn bdrv_co_writev_vmstate(BlockDriverState *bs,
59 QEMUIOVector *qiov, int64_t pos);
60
61int coroutine_fn
62nbd_co_do_establish_connection(BlockDriverState *bs, Error **errp);
63
64
65int coroutine_fn
66blk_co_do_preadv(BlockBackend *blk, int64_t offset, int64_t bytes,
67 QEMUIOVector *qiov, BdrvRequestFlags flags);
68
69
70int coroutine_fn
71blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
72 QEMUIOVector *qiov, size_t qiov_offset,
73 BdrvRequestFlags flags);
74
75int coroutine_fn
76blk_co_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
77
78int coroutine_fn
79blk_co_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes);
80
81int coroutine_fn blk_co_do_flush(BlockBackend *blk);
82
83
84
85
86
87
88
89
90
91
92int generated_co_wrapper
93bdrv_preadv(BdrvChild *child, int64_t offset, unsigned int bytes,
94 QEMUIOVector *qiov, BdrvRequestFlags flags);
95
96int generated_co_wrapper
97bdrv_pwritev(BdrvChild *child, int64_t offset, unsigned int bytes,
98 QEMUIOVector *qiov, BdrvRequestFlags flags);
99
100int generated_co_wrapper
101bdrv_common_block_status_above(BlockDriverState *bs,
102 BlockDriverState *base,
103 bool include_base,
104 bool want_zero,
105 int64_t offset,
106 int64_t bytes,
107 int64_t *pnum,
108 int64_t *map,
109 BlockDriverState **file,
110 int *depth);
111int generated_co_wrapper
112nbd_do_establish_connection(BlockDriverState *bs, Error **errp);
113
114int generated_co_wrapper
115blk_do_preadv(BlockBackend *blk, int64_t offset, int64_t bytes,
116 QEMUIOVector *qiov, BdrvRequestFlags flags);
117
118int generated_co_wrapper
119blk_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
120 QEMUIOVector *qiov, size_t qiov_offset,
121 BdrvRequestFlags flags);
122
123int generated_co_wrapper
124blk_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
125
126int generated_co_wrapper
127blk_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes);
128
129int generated_co_wrapper blk_do_flush(BlockBackend *blk);
130
131#endif
132