block.h (6f7a3b535f0d48d138e43cadf13323f083bfb547) | block.h (bd86fb990cfedc50d9705b8ed31d183f01942035) |
---|---|
1#ifndef BLOCK_H 2#define BLOCK_H 3 4#include "block/aio.h" 5#include "block/aio-wait.h" 6#include "qemu/iov.h" 7#include "qemu/coroutine.h" 8#include "block/accounting.h" 9#include "block/dirty-bitmap.h" 10#include "block/blockjob.h" 11#include "qemu/hbitmap.h" 12 13/* block.c */ 14typedef struct BlockDriver BlockDriver; 15typedef struct BdrvChild BdrvChild; | 1#ifndef BLOCK_H 2#define BLOCK_H 3 4#include "block/aio.h" 5#include "block/aio-wait.h" 6#include "qemu/iov.h" 7#include "qemu/coroutine.h" 8#include "block/accounting.h" 9#include "block/dirty-bitmap.h" 10#include "block/blockjob.h" 11#include "qemu/hbitmap.h" 12 13/* block.c */ 14typedef struct BlockDriver BlockDriver; 15typedef struct BdrvChild BdrvChild; |
16typedef struct BdrvChildRole BdrvChildRole; | 16typedef struct BdrvChildClass BdrvChildClass; |
17 18typedef struct BlockDriverInfo { 19 /* in bytes, 0 if irrelevant */ 20 int cluster_size; 21 /* offset at which the VM state can be saved (0 if not possible) */ 22 int64_t vm_state_offset; 23 bool is_dirty; 24 /* --- 266 unchanged lines hidden (view full) --- 291 Error **errp); 292 293int bdrv_parse_aio(const char *mode, int *flags); 294int bdrv_parse_cache_mode(const char *mode, int *flags, bool *writethrough); 295int bdrv_parse_discard_flags(const char *mode, int *flags); 296BdrvChild *bdrv_open_child(const char *filename, 297 QDict *options, const char *bdref_key, 298 BlockDriverState* parent, | 17 18typedef struct BlockDriverInfo { 19 /* in bytes, 0 if irrelevant */ 20 int cluster_size; 21 /* offset at which the VM state can be saved (0 if not possible) */ 22 int64_t vm_state_offset; 23 bool is_dirty; 24 /* --- 266 unchanged lines hidden (view full) --- 291 Error **errp); 292 293int bdrv_parse_aio(const char *mode, int *flags); 294int bdrv_parse_cache_mode(const char *mode, int *flags, bool *writethrough); 295int bdrv_parse_discard_flags(const char *mode, int *flags); 296BdrvChild *bdrv_open_child(const char *filename, 297 QDict *options, const char *bdref_key, 298 BlockDriverState* parent, |
299 const BdrvChildRole *child_role, | 299 const BdrvChildClass *child_class, |
300 bool allow_none, Error **errp); 301BlockDriverState *bdrv_open_blockdev_ref(BlockdevRef *ref, Error **errp); 302void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd, 303 Error **errp); 304int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, 305 const char *bdref_key, Error **errp); 306BlockDriverState *bdrv_open(const char *filename, const char *reference, 307 QDict *options, int flags, Error **errp); --- 228 unchanged lines hidden (view full) --- 536void bdrv_disable_copy_on_read(BlockDriverState *bs); 537 538void bdrv_ref(BlockDriverState *bs); 539void bdrv_unref(BlockDriverState *bs); 540void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child); 541BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs, 542 BlockDriverState *child_bs, 543 const char *child_name, | 300 bool allow_none, Error **errp); 301BlockDriverState *bdrv_open_blockdev_ref(BlockdevRef *ref, Error **errp); 302void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd, 303 Error **errp); 304int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, 305 const char *bdref_key, Error **errp); 306BlockDriverState *bdrv_open(const char *filename, const char *reference, 307 QDict *options, int flags, Error **errp); --- 228 unchanged lines hidden (view full) --- 536void bdrv_disable_copy_on_read(BlockDriverState *bs); 537 538void bdrv_ref(BlockDriverState *bs); 539void bdrv_unref(BlockDriverState *bs); 540void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child); 541BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs, 542 BlockDriverState *child_bs, 543 const char *child_name, |
544 const BdrvChildRole *child_role, | 544 const BdrvChildClass *child_class, |
545 Error **errp); 546 547bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp); 548void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason); 549void bdrv_op_unblock(BlockDriverState *bs, BlockOpType op, Error *reason); 550void bdrv_op_block_all(BlockDriverState *bs, Error *reason); 551void bdrv_op_unblock_all(BlockDriverState *bs, Error *reason); 552bool bdrv_op_blocker_is_empty(BlockDriverState *bs); --- 187 unchanged lines hidden --- | 545 Error **errp); 546 547bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp); 548void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason); 549void bdrv_op_unblock(BlockDriverState *bs, BlockOpType op, Error *reason); 550void bdrv_op_block_all(BlockDriverState *bs, Error *reason); 551void bdrv_op_unblock_all(BlockDriverState *bs, Error *reason); 552bool bdrv_op_blocker_is_empty(BlockDriverState *bs); --- 187 unchanged lines hidden --- |