block.h (91c6e4b7bba906cfb8d84481da6340957f876c90) block.h (7c8eece45b10fc9b716850345118ed6fa8d17887)
1#ifndef BLOCK_H
2#define BLOCK_H
3
4#include "block/aio.h"
5#include "qemu/iov.h"
6#include "qemu/option.h"
7#include "qemu/coroutine.h"
8#include "block/accounting.h"
9#include "block/dirty-bitmap.h"
10#include "qapi/qmp/qobject.h"
11#include "qapi-types.h"
12#include "qemu/hbitmap.h"
13
14/* block.c */
15typedef struct BlockDriver BlockDriver;
16typedef struct BlockJob BlockJob;
17typedef struct BdrvChild BdrvChild;
18typedef struct BdrvChildRole BdrvChildRole;
19typedef struct BlockJobTxn BlockJobTxn;
1#ifndef BLOCK_H
2#define BLOCK_H
3
4#include "block/aio.h"
5#include "qemu/iov.h"
6#include "qemu/option.h"
7#include "qemu/coroutine.h"
8#include "block/accounting.h"
9#include "block/dirty-bitmap.h"
10#include "qapi/qmp/qobject.h"
11#include "qapi-types.h"
12#include "qemu/hbitmap.h"
13
14/* block.c */
15typedef struct BlockDriver BlockDriver;
16typedef struct BlockJob BlockJob;
17typedef struct BdrvChild BdrvChild;
18typedef struct BdrvChildRole BdrvChildRole;
19typedef struct BlockJobTxn BlockJobTxn;
20typedef struct BdrvNextIterator BdrvNextIterator;
20
21typedef struct BlockDriverInfo {
22 /* in bytes, 0 if irrelevant */
23 int cluster_size;
24 /* offset at which the VM state can be saved (0 if not possible) */
25 int64_t vm_state_offset;
26 bool is_dirty;
27 /*

--- 368 unchanged lines hidden (view full) ---

396const char *bdrv_get_format_name(BlockDriverState *bs);
397BlockDriverState *bdrv_find_node(const char *node_name);
398BlockDeviceInfoList *bdrv_named_nodes_list(Error **errp);
399BlockDriverState *bdrv_lookup_bs(const char *device,
400 const char *node_name,
401 Error **errp);
402bool bdrv_chain_contains(BlockDriverState *top, BlockDriverState *base);
403BlockDriverState *bdrv_next_node(BlockDriverState *bs);
21
22typedef struct BlockDriverInfo {
23 /* in bytes, 0 if irrelevant */
24 int cluster_size;
25 /* offset at which the VM state can be saved (0 if not possible) */
26 int64_t vm_state_offset;
27 bool is_dirty;
28 /*

--- 368 unchanged lines hidden (view full) ---

397const char *bdrv_get_format_name(BlockDriverState *bs);
398BlockDriverState *bdrv_find_node(const char *node_name);
399BlockDeviceInfoList *bdrv_named_nodes_list(Error **errp);
400BlockDriverState *bdrv_lookup_bs(const char *device,
401 const char *node_name,
402 Error **errp);
403bool bdrv_chain_contains(BlockDriverState *top, BlockDriverState *base);
404BlockDriverState *bdrv_next_node(BlockDriverState *bs);
404BlockDriverState *bdrv_next(BlockDriverState *bs);
405BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs);
405BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs);
406int bdrv_is_encrypted(BlockDriverState *bs);
407int bdrv_key_required(BlockDriverState *bs);
408int bdrv_set_key(BlockDriverState *bs, const char *key);
409void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp);
410int bdrv_query_missing_keys(void);
411void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
412 void *opaque);

--- 134 unchanged lines hidden ---
406BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs);
407int bdrv_is_encrypted(BlockDriverState *bs);
408int bdrv_key_required(BlockDriverState *bs);
409int bdrv_set_key(BlockDriverState *bs, const char *key);
410void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp);
411int bdrv_query_missing_keys(void);
412void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
413 void *opaque);

--- 134 unchanged lines hidden ---