root / block.h @ 48ff7a62
History | View | Annotate | Download (11.6 kB)
1 | faf07963 | pbrook | #ifndef BLOCK_H
|
---|---|---|---|
2 | faf07963 | pbrook | #define BLOCK_H
|
3 | faf07963 | pbrook | |
4 | a76bab49 | aliguori | #include "qemu-aio.h" |
5 | 3b69e4b9 | aliguori | #include "qemu-common.h" |
6 | 0e7e1989 | Kevin Wolf | #include "qemu-option.h" |
7 | d15e5465 | Luiz Capitulino | #include "qobject.h" |
8 | a76bab49 | aliguori | |
9 | faf07963 | pbrook | /* block.c */
|
10 | faf07963 | pbrook | typedef struct BlockDriver BlockDriver; |
11 | faf07963 | pbrook | |
12 | faf07963 | pbrook | typedef struct BlockDriverInfo { |
13 | faf07963 | pbrook | /* in bytes, 0 if irrelevant */
|
14 | faf07963 | pbrook | int cluster_size;
|
15 | faf07963 | pbrook | /* offset at which the VM state can be saved (0 if not possible) */
|
16 | faf07963 | pbrook | int64_t vm_state_offset; |
17 | faf07963 | pbrook | } BlockDriverInfo; |
18 | faf07963 | pbrook | |
19 | faf07963 | pbrook | typedef struct QEMUSnapshotInfo { |
20 | faf07963 | pbrook | char id_str[128]; /* unique snapshot id */ |
21 | faf07963 | pbrook | /* the following fields are informative. They are not needed for
|
22 | faf07963 | pbrook | the consistency of the snapshot */
|
23 | faf07963 | pbrook | char name[256]; /* user choosen name */ |
24 | faf07963 | pbrook | uint32_t vm_state_size; /* VM state info size */
|
25 | faf07963 | pbrook | uint32_t date_sec; /* UTC date of the snapshot */
|
26 | faf07963 | pbrook | uint32_t date_nsec; |
27 | faf07963 | pbrook | uint64_t vm_clock_nsec; /* VM clock relative to boot */
|
28 | faf07963 | pbrook | } QEMUSnapshotInfo; |
29 | faf07963 | pbrook | |
30 | faf07963 | pbrook | #define BDRV_O_RDWR 0x0002 |
31 | faf07963 | pbrook | #define BDRV_O_SNAPSHOT 0x0008 /* open the file read only and save writes in a snapshot */ |
32 | 9f7965c7 | aliguori | #define BDRV_O_NOCACHE 0x0020 /* do not use the host page cache */ |
33 | 9f7965c7 | aliguori | #define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */ |
34 | 5c6c3a6c | Christoph Hellwig | #define BDRV_O_NATIVE_AIO 0x0080 /* use native AIO instead of the thread pool */ |
35 | b783e409 | Kevin Wolf | #define BDRV_O_NO_BACKING 0x0100 /* don't open the backing file */ |
36 | 016f5cf6 | Alexander Graf | #define BDRV_O_NO_FLUSH 0x0200 /* disable flushing on this disk */ |
37 | 9f7965c7 | aliguori | |
38 | ceb25e5c | Kevin Wolf | #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)
|
39 | faf07963 | pbrook | |
40 | 6ea44308 | Jan Kiszka | #define BDRV_SECTOR_BITS 9 |
41 | c63782cb | Jes Sorensen | #define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) |
42 | 3abbc4d9 | Stefan Hajnoczi | #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) |
43 | 6ea44308 | Jan Kiszka | |
44 | 2582bfed | Luiz Capitulino | typedef enum { |
45 | abd7f68d | Markus Armbruster | BLOCK_ERR_REPORT, BLOCK_ERR_IGNORE, BLOCK_ERR_STOP_ENOSPC, |
46 | abd7f68d | Markus Armbruster | BLOCK_ERR_STOP_ANY |
47 | abd7f68d | Markus Armbruster | } BlockErrorAction; |
48 | abd7f68d | Markus Armbruster | |
49 | abd7f68d | Markus Armbruster | typedef enum { |
50 | 2582bfed | Luiz Capitulino | BDRV_ACTION_REPORT, BDRV_ACTION_IGNORE, BDRV_ACTION_STOP |
51 | 2582bfed | Luiz Capitulino | } BlockMonEventAction; |
52 | 2582bfed | Luiz Capitulino | |
53 | 2582bfed | Luiz Capitulino | void bdrv_mon_event(const BlockDriverState *bdrv, |
54 | 2582bfed | Luiz Capitulino | BlockMonEventAction action, int is_read);
|
55 | d15e5465 | Luiz Capitulino | void bdrv_info_print(Monitor *mon, const QObject *data); |
56 | d15e5465 | Luiz Capitulino | void bdrv_info(Monitor *mon, QObject **ret_data);
|
57 | 218a536a | Luiz Capitulino | void bdrv_stats_print(Monitor *mon, const QObject *data); |
58 | 218a536a | Luiz Capitulino | void bdrv_info_stats(Monitor *mon, QObject **ret_data);
|
59 | faf07963 | pbrook | |
60 | faf07963 | pbrook | void bdrv_init(void); |
61 | eb852011 | Markus Armbruster | void bdrv_init_with_whitelist(void); |
62 | b50cbabc | MORITA Kazutaka | BlockDriver *bdrv_find_protocol(const char *filename); |
63 | faf07963 | pbrook | BlockDriver *bdrv_find_format(const char *format_name); |
64 | eb852011 | Markus Armbruster | BlockDriver *bdrv_find_whitelisted_format(const char *format_name); |
65 | 0e7e1989 | Kevin Wolf | int bdrv_create(BlockDriver *drv, const char* filename, |
66 | 0e7e1989 | Kevin Wolf | QEMUOptionParameter *options); |
67 | 84a12e66 | Christoph Hellwig | int bdrv_create_file(const char* filename, QEMUOptionParameter *options); |
68 | faf07963 | pbrook | BlockDriverState *bdrv_new(const char *device_name); |
69 | d22b2f41 | Ryan Harper | void bdrv_make_anon(BlockDriverState *bs);
|
70 | faf07963 | pbrook | void bdrv_delete(BlockDriverState *bs);
|
71 | faf07963 | pbrook | int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags); |
72 | d6e9098e | Kevin Wolf | int bdrv_open(BlockDriverState *bs, const char *filename, int flags, |
73 | d6e9098e | Kevin Wolf | BlockDriver *drv); |
74 | faf07963 | pbrook | void bdrv_close(BlockDriverState *bs);
|
75 | 18846dee | Markus Armbruster | int bdrv_attach(BlockDriverState *bs, DeviceState *qdev);
|
76 | 18846dee | Markus Armbruster | void bdrv_detach(BlockDriverState *bs, DeviceState *qdev);
|
77 | 18846dee | Markus Armbruster | DeviceState *bdrv_get_attached(BlockDriverState *bs); |
78 | faf07963 | pbrook | int bdrv_read(BlockDriverState *bs, int64_t sector_num,
|
79 | faf07963 | pbrook | uint8_t *buf, int nb_sectors);
|
80 | faf07963 | pbrook | int bdrv_write(BlockDriverState *bs, int64_t sector_num,
|
81 | faf07963 | pbrook | const uint8_t *buf, int nb_sectors); |
82 | faf07963 | pbrook | int bdrv_pread(BlockDriverState *bs, int64_t offset,
|
83 | faf07963 | pbrook | void *buf, int count); |
84 | faf07963 | pbrook | int bdrv_pwrite(BlockDriverState *bs, int64_t offset,
|
85 | faf07963 | pbrook | const void *buf, int count); |
86 | f08145fe | Kevin Wolf | int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset,
|
87 | f08145fe | Kevin Wolf | const void *buf, int count); |
88 | f08145fe | Kevin Wolf | int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
|
89 | f08145fe | Kevin Wolf | const uint8_t *buf, int nb_sectors); |
90 | faf07963 | pbrook | int bdrv_truncate(BlockDriverState *bs, int64_t offset);
|
91 | faf07963 | pbrook | int64_t bdrv_getlength(BlockDriverState *bs); |
92 | 96b8f136 | ths | void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr);
|
93 | f3d54fc4 | aliguori | void bdrv_guess_geometry(BlockDriverState *bs, int *pcyls, int *pheads, int *psecs); |
94 | faf07963 | pbrook | int bdrv_commit(BlockDriverState *bs);
|
95 | 6ab4b5ab | Markus Armbruster | void bdrv_commit_all(void); |
96 | 756e6736 | Kevin Wolf | int bdrv_change_backing_file(BlockDriverState *bs,
|
97 | 756e6736 | Kevin Wolf | const char *backing_file, const char *backing_fmt); |
98 | 5efa9d5a | Anthony Liguori | void bdrv_register(BlockDriver *bdrv);
|
99 | 5efa9d5a | Anthony Liguori | |
100 | e076f338 | Kevin Wolf | |
101 | e076f338 | Kevin Wolf | typedef struct BdrvCheckResult { |
102 | e076f338 | Kevin Wolf | int corruptions;
|
103 | e076f338 | Kevin Wolf | int leaks;
|
104 | e076f338 | Kevin Wolf | int check_errors;
|
105 | e076f338 | Kevin Wolf | } BdrvCheckResult; |
106 | e076f338 | Kevin Wolf | |
107 | e076f338 | Kevin Wolf | int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res);
|
108 | e076f338 | Kevin Wolf | |
109 | faf07963 | pbrook | /* async block I/O */
|
110 | faf07963 | pbrook | typedef struct BlockDriverAIOCB BlockDriverAIOCB; |
111 | faf07963 | pbrook | typedef void BlockDriverCompletionFunc(void *opaque, int ret); |
112 | 7cd1e32a | lirans@il.ibm.com | typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, |
113 | 39aa9a12 | Devin Nakamura | int sector_num);
|
114 | 3b69e4b9 | aliguori | BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, |
115 | 3b69e4b9 | aliguori | QEMUIOVector *iov, int nb_sectors,
|
116 | 3b69e4b9 | aliguori | BlockDriverCompletionFunc *cb, void *opaque);
|
117 | 3b69e4b9 | aliguori | BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num, |
118 | 3b69e4b9 | aliguori | QEMUIOVector *iov, int nb_sectors,
|
119 | 3b69e4b9 | aliguori | BlockDriverCompletionFunc *cb, void *opaque);
|
120 | b2e12bc6 | Christoph Hellwig | BlockDriverAIOCB *bdrv_aio_flush(BlockDriverState *bs, |
121 | 39aa9a12 | Devin Nakamura | BlockDriverCompletionFunc *cb, void *opaque);
|
122 | faf07963 | pbrook | void bdrv_aio_cancel(BlockDriverAIOCB *acb);
|
123 | faf07963 | pbrook | |
124 | 40b4f539 | Kevin Wolf | typedef struct BlockRequest { |
125 | 40b4f539 | Kevin Wolf | /* Fields to be filled by multiwrite caller */
|
126 | 40b4f539 | Kevin Wolf | int64_t sector; |
127 | 40b4f539 | Kevin Wolf | int nb_sectors;
|
128 | 40b4f539 | Kevin Wolf | QEMUIOVector *qiov; |
129 | 40b4f539 | Kevin Wolf | BlockDriverCompletionFunc *cb; |
130 | 40b4f539 | Kevin Wolf | void *opaque;
|
131 | 40b4f539 | Kevin Wolf | |
132 | 40b4f539 | Kevin Wolf | /* Filled by multiwrite implementation */
|
133 | 40b4f539 | Kevin Wolf | int error;
|
134 | 40b4f539 | Kevin Wolf | } BlockRequest; |
135 | 40b4f539 | Kevin Wolf | |
136 | 40b4f539 | Kevin Wolf | int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs,
|
137 | 40b4f539 | Kevin Wolf | int num_reqs);
|
138 | 40b4f539 | Kevin Wolf | |
139 | 7d780669 | aliguori | /* sg packet commands */
|
140 | 221f715d | aliguori | int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf); |
141 | 221f715d | aliguori | BlockDriverAIOCB *bdrv_aio_ioctl(BlockDriverState *bs, |
142 | 221f715d | aliguori | unsigned long int req, void *buf, |
143 | 221f715d | aliguori | BlockDriverCompletionFunc *cb, void *opaque);
|
144 | 7d780669 | aliguori | |
145 | faf07963 | pbrook | /* Ensure contents are flushed to disk. */
|
146 | 205ef796 | Kevin Wolf | int bdrv_flush(BlockDriverState *bs);
|
147 | c6ca28d6 | aliguori | void bdrv_flush_all(void); |
148 | 2bc93fed | MORITA Kazutaka | void bdrv_close_all(void); |
149 | c6ca28d6 | aliguori | |
150 | bb8bf76f | Christoph Hellwig | int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors); |
151 | f2feebbd | Kevin Wolf | int bdrv_has_zero_init(BlockDriverState *bs);
|
152 | f58c7b35 | ths | int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, |
153 | 39aa9a12 | Devin Nakamura | int *pnum);
|
154 | faf07963 | pbrook | |
155 | faf07963 | pbrook | #define BIOS_ATA_TRANSLATION_AUTO 0 |
156 | faf07963 | pbrook | #define BIOS_ATA_TRANSLATION_NONE 1 |
157 | faf07963 | pbrook | #define BIOS_ATA_TRANSLATION_LBA 2 |
158 | faf07963 | pbrook | #define BIOS_ATA_TRANSLATION_LARGE 3 |
159 | faf07963 | pbrook | #define BIOS_ATA_TRANSLATION_RECHS 4 |
160 | faf07963 | pbrook | |
161 | faf07963 | pbrook | void bdrv_set_geometry_hint(BlockDriverState *bs,
|
162 | faf07963 | pbrook | int cyls, int heads, int secs); |
163 | faf07963 | pbrook | void bdrv_set_translation_hint(BlockDriverState *bs, int translation); |
164 | faf07963 | pbrook | void bdrv_get_geometry_hint(BlockDriverState *bs,
|
165 | faf07963 | pbrook | int *pcyls, int *pheads, int *psecs); |
166 | 5bbdbb46 | Blue Swirl | typedef enum FDriveType { |
167 | 5bbdbb46 | Blue Swirl | FDRIVE_DRV_144 = 0x00, /* 1.44 MB 3"5 drive */ |
168 | 5bbdbb46 | Blue Swirl | FDRIVE_DRV_288 = 0x01, /* 2.88 MB 3"5 drive */ |
169 | 5bbdbb46 | Blue Swirl | FDRIVE_DRV_120 = 0x02, /* 1.2 MB 5"25 drive */ |
170 | 5bbdbb46 | Blue Swirl | FDRIVE_DRV_NONE = 0x03, /* No drive connected */ |
171 | 5bbdbb46 | Blue Swirl | } FDriveType; |
172 | 5bbdbb46 | Blue Swirl | |
173 | 5bbdbb46 | Blue Swirl | void bdrv_get_floppy_geometry_hint(BlockDriverState *bs, int *nb_heads, |
174 | 5bbdbb46 | Blue Swirl | int *max_track, int *last_sect, |
175 | 5bbdbb46 | Blue Swirl | FDriveType drive_in, FDriveType *drive); |
176 | faf07963 | pbrook | int bdrv_get_translation_hint(BlockDriverState *bs);
|
177 | abd7f68d | Markus Armbruster | void bdrv_set_on_error(BlockDriverState *bs, BlockErrorAction on_read_error,
|
178 | abd7f68d | Markus Armbruster | BlockErrorAction on_write_error); |
179 | abd7f68d | Markus Armbruster | BlockErrorAction bdrv_get_on_error(BlockDriverState *bs, int is_read);
|
180 | 7d0d6950 | Markus Armbruster | void bdrv_set_removable(BlockDriverState *bs, int removable); |
181 | faf07963 | pbrook | int bdrv_is_removable(BlockDriverState *bs);
|
182 | faf07963 | pbrook | int bdrv_is_read_only(BlockDriverState *bs);
|
183 | 985a03b0 | ths | int bdrv_is_sg(BlockDriverState *bs);
|
184 | e900a7b7 | Christoph Hellwig | int bdrv_enable_write_cache(BlockDriverState *bs);
|
185 | faf07963 | pbrook | int bdrv_is_inserted(BlockDriverState *bs);
|
186 | faf07963 | pbrook | int bdrv_media_changed(BlockDriverState *bs);
|
187 | faf07963 | pbrook | int bdrv_is_locked(BlockDriverState *bs);
|
188 | faf07963 | pbrook | void bdrv_set_locked(BlockDriverState *bs, int locked); |
189 | aea2a33c | Mark McLoughlin | int bdrv_eject(BlockDriverState *bs, int eject_flag); |
190 | faf07963 | pbrook | void bdrv_set_change_cb(BlockDriverState *bs,
|
191 | db97ee6a | Christoph Hellwig | void (*change_cb)(void *opaque, int reason), |
192 | db97ee6a | Christoph Hellwig | void *opaque);
|
193 | faf07963 | pbrook | void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size); |
194 | faf07963 | pbrook | BlockDriverState *bdrv_find(const char *name); |
195 | 2f399b0a | Markus Armbruster | BlockDriverState *bdrv_next(BlockDriverState *bs); |
196 | 51de9760 | aliguori | void bdrv_iterate(void (*it)(void *opaque, BlockDriverState *bs), |
197 | 51de9760 | aliguori | void *opaque);
|
198 | faf07963 | pbrook | int bdrv_is_encrypted(BlockDriverState *bs);
|
199 | c0f4ce77 | aliguori | int bdrv_key_required(BlockDriverState *bs);
|
200 | faf07963 | pbrook | int bdrv_set_key(BlockDriverState *bs, const char *key); |
201 | c0f4ce77 | aliguori | int bdrv_query_missing_keys(void); |
202 | faf07963 | pbrook | void bdrv_iterate_format(void (*it)(void *opaque, const char *name), |
203 | faf07963 | pbrook | void *opaque);
|
204 | faf07963 | pbrook | const char *bdrv_get_device_name(BlockDriverState *bs); |
205 | faf07963 | pbrook | int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
|
206 | faf07963 | pbrook | const uint8_t *buf, int nb_sectors); |
207 | faf07963 | pbrook | int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
|
208 | faf07963 | pbrook | |
209 | 045df330 | aliguori | const char *bdrv_get_encrypted_filename(BlockDriverState *bs); |
210 | faf07963 | pbrook | void bdrv_get_backing_filename(BlockDriverState *bs,
|
211 | faf07963 | pbrook | char *filename, int filename_size); |
212 | feeee5ac | Miguel Di Ciurcio Filho | int bdrv_can_snapshot(BlockDriverState *bs);
|
213 | 199630b6 | Blue Swirl | int bdrv_is_snapshot(BlockDriverState *bs);
|
214 | f9092b10 | Markus Armbruster | BlockDriverState *bdrv_snapshots(void);
|
215 | faf07963 | pbrook | int bdrv_snapshot_create(BlockDriverState *bs,
|
216 | faf07963 | pbrook | QEMUSnapshotInfo *sn_info); |
217 | faf07963 | pbrook | int bdrv_snapshot_goto(BlockDriverState *bs,
|
218 | faf07963 | pbrook | const char *snapshot_id); |
219 | faf07963 | pbrook | int bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id); |
220 | faf07963 | pbrook | int bdrv_snapshot_list(BlockDriverState *bs,
|
221 | faf07963 | pbrook | QEMUSnapshotInfo **psn_info); |
222 | 51ef6727 | edison | int bdrv_snapshot_load_tmp(BlockDriverState *bs,
|
223 | 51ef6727 | edison | const char *snapshot_name); |
224 | faf07963 | pbrook | char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn); |
225 | faf07963 | pbrook | |
226 | faf07963 | pbrook | char *get_human_readable_size(char *buf, int buf_size, int64_t size); |
227 | faf07963 | pbrook | int path_is_absolute(const char *path); |
228 | faf07963 | pbrook | void path_combine(char *dest, int dest_size, |
229 | faf07963 | pbrook | const char *base_path, |
230 | faf07963 | pbrook | const char *filename); |
231 | faf07963 | pbrook | |
232 | 45566e9c | Christoph Hellwig | int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf, |
233 | 45566e9c | Christoph Hellwig | int64_t pos, int size);
|
234 | 178e08a5 | aliguori | |
235 | 45566e9c | Christoph Hellwig | int bdrv_load_vmstate(BlockDriverState *bs, uint8_t *buf,
|
236 | 45566e9c | Christoph Hellwig | int64_t pos, int size);
|
237 | 178e08a5 | aliguori | |
238 | f88e1a42 | Jes Sorensen | int bdrv_img_create(const char *filename, const char *fmt, |
239 | f88e1a42 | Jes Sorensen | const char *base_filename, const char *base_fmt, |
240 | f88e1a42 | Jes Sorensen | char *options, uint64_t img_size, int flags); |
241 | f88e1a42 | Jes Sorensen | |
242 | 23bd90d2 | Jan Kiszka | #define BDRV_SECTORS_PER_DIRTY_CHUNK 2048 |
243 | 6ea44308 | Jan Kiszka | |
244 | 7cd1e32a | lirans@il.ibm.com | void bdrv_set_dirty_tracking(BlockDriverState *bs, int enable); |
245 | 7cd1e32a | lirans@il.ibm.com | int bdrv_get_dirty(BlockDriverState *bs, int64_t sector);
|
246 | a55eb92c | Jan Kiszka | void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
|
247 | a55eb92c | Jan Kiszka | int nr_sectors);
|
248 | aaa0eb75 | Liran Schour | int64_t bdrv_get_dirty_count(BlockDriverState *bs); |
249 | 8b9b0cc2 | Kevin Wolf | |
250 | db593f25 | Marcelo Tosatti | void bdrv_set_in_use(BlockDriverState *bs, int in_use); |
251 | db593f25 | Marcelo Tosatti | int bdrv_in_use(BlockDriverState *bs);
|
252 | 8b9b0cc2 | Kevin Wolf | |
253 | 8b9b0cc2 | Kevin Wolf | typedef enum { |
254 | 8252278a | Kevin Wolf | BLKDBG_L1_UPDATE, |
255 | 8252278a | Kevin Wolf | |
256 | 8252278a | Kevin Wolf | BLKDBG_L1_GROW_ALLOC_TABLE, |
257 | 8252278a | Kevin Wolf | BLKDBG_L1_GROW_WRITE_TABLE, |
258 | 8252278a | Kevin Wolf | BLKDBG_L1_GROW_ACTIVATE_TABLE, |
259 | 8252278a | Kevin Wolf | |
260 | 8252278a | Kevin Wolf | BLKDBG_L2_LOAD, |
261 | 8252278a | Kevin Wolf | BLKDBG_L2_UPDATE, |
262 | 8252278a | Kevin Wolf | BLKDBG_L2_UPDATE_COMPRESSED, |
263 | 8252278a | Kevin Wolf | BLKDBG_L2_ALLOC_COW_READ, |
264 | 8252278a | Kevin Wolf | BLKDBG_L2_ALLOC_WRITE, |
265 | 8252278a | Kevin Wolf | |
266 | 8252278a | Kevin Wolf | BLKDBG_READ, |
267 | 8252278a | Kevin Wolf | BLKDBG_READ_AIO, |
268 | 8252278a | Kevin Wolf | BLKDBG_READ_BACKING, |
269 | 8252278a | Kevin Wolf | BLKDBG_READ_BACKING_AIO, |
270 | 8252278a | Kevin Wolf | BLKDBG_READ_COMPRESSED, |
271 | 8252278a | Kevin Wolf | |
272 | 8252278a | Kevin Wolf | BLKDBG_WRITE_AIO, |
273 | 8252278a | Kevin Wolf | BLKDBG_WRITE_COMPRESSED, |
274 | 8252278a | Kevin Wolf | |
275 | 8252278a | Kevin Wolf | BLKDBG_VMSTATE_LOAD, |
276 | 8252278a | Kevin Wolf | BLKDBG_VMSTATE_SAVE, |
277 | 8252278a | Kevin Wolf | |
278 | 8252278a | Kevin Wolf | BLKDBG_COW_READ, |
279 | 8252278a | Kevin Wolf | BLKDBG_COW_WRITE, |
280 | 8252278a | Kevin Wolf | |
281 | 8252278a | Kevin Wolf | BLKDBG_REFTABLE_LOAD, |
282 | 8252278a | Kevin Wolf | BLKDBG_REFTABLE_GROW, |
283 | 8252278a | Kevin Wolf | |
284 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_LOAD, |
285 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_UPDATE, |
286 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_UPDATE_PART, |
287 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC, |
288 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC_HOOKUP, |
289 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC_WRITE, |
290 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC_WRITE_BLOCKS, |
291 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC_WRITE_TABLE, |
292 | 8252278a | Kevin Wolf | BLKDBG_REFBLOCK_ALLOC_SWITCH_TABLE, |
293 | 8252278a | Kevin Wolf | |
294 | 8252278a | Kevin Wolf | BLKDBG_CLUSTER_ALLOC, |
295 | 8252278a | Kevin Wolf | BLKDBG_CLUSTER_ALLOC_BYTES, |
296 | 8252278a | Kevin Wolf | BLKDBG_CLUSTER_FREE, |
297 | 8252278a | Kevin Wolf | |
298 | 8b9b0cc2 | Kevin Wolf | BLKDBG_EVENT_MAX, |
299 | 8b9b0cc2 | Kevin Wolf | } BlkDebugEvent; |
300 | 8b9b0cc2 | Kevin Wolf | |
301 | 8b9b0cc2 | Kevin Wolf | #define BLKDBG_EVENT(bs, evt) bdrv_debug_event(bs, evt)
|
302 | 8b9b0cc2 | Kevin Wolf | void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event);
|
303 | 8b9b0cc2 | Kevin Wolf | |
304 | faf07963 | pbrook | #endif |