diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block.h | 4 | ||||
-rw-r--r-- | include/block/block_int.h | 7 | ||||
-rw-r--r-- | include/block/coroutine.h | 7 | ||||
-rw-r--r-- | include/block/snapshot.h | 15 |
4 files changed, 24 insertions, 9 deletions
diff --git a/include/block/block.h b/include/block/block.h index 5beccbf1cf..36efaeac2d 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -216,6 +216,9 @@ int bdrv_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors); int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags); +BlockDriverAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs, int64_t sector_num, + int nb_sectors, BdrvRequestFlags flags, + BlockDriverCompletionFunc *cb, void *opaque); int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags); int bdrv_writev(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov); int bdrv_pread(BlockDriverState *bs, int64_t offset, @@ -311,6 +314,7 @@ typedef struct BlockRequest { /* Fields to be filled by multiwrite caller */ int64_t sector; int nb_sectors; + int flags; QEMUIOVector *qiov; BlockDriverCompletionFunc *cb; void *opaque; diff --git a/include/block/block_int.h b/include/block/block_int.h index 773899b500..8b132d7178 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -176,7 +176,9 @@ struct BlockDriver { int (*bdrv_snapshot_list)(BlockDriverState *bs, QEMUSnapshotInfo **psn_info); int (*bdrv_snapshot_load_tmp)(BlockDriverState *bs, - const char *snapshot_name); + const char *snapshot_id, + const char *name, + Error **errp); int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs); @@ -245,6 +247,9 @@ typedef struct BlockLimits { /* optimal alignment for write zeroes requests in sectors */ int64_t write_zeroes_alignment; + + /* optimal transfer length in sectors */ + int opt_transfer_length; } BlockLimits; /* diff --git a/include/block/coroutine.h b/include/block/coroutine.h index 4d5c0cfdd7..a1797ae3d8 100644 --- a/include/block/coroutine.h +++ b/include/block/coroutine.h @@ -105,7 +105,6 @@ bool qemu_in_coroutine(void); */ typedef struct CoQueue { QTAILQ_HEAD(, Coroutine) entries; - AioContext *ctx; } CoQueue; /** @@ -121,12 +120,6 @@ void qemu_co_queue_init(CoQueue *queue); void coroutine_fn qemu_co_queue_wait(CoQueue *queue); /** - * Adds the current coroutine to the head of the CoQueue and transfers control to the - * caller of the coroutine. - */ -void coroutine_fn qemu_co_queue_wait_insert_head(CoQueue *queue); - -/** * Restarts the next coroutine in the CoQueue and removes it from the queue. * * Returns true if a coroutine was restarted, false if the queue is empty. diff --git a/include/block/snapshot.h b/include/block/snapshot.h index 012bf226d3..770d9bbc8c 100644 --- a/include/block/snapshot.h +++ b/include/block/snapshot.h @@ -27,6 +27,14 @@ #include "qemu-common.h" #include "qapi/error.h" +#include "qemu/option.h" + + +#define SNAPSHOT_OPT_BASE "snapshot." +#define SNAPSHOT_OPT_ID "snapshot.id" +#define SNAPSHOT_OPT_NAME "snapshot.name" + +extern QemuOptsList internal_snapshot_opts; typedef struct QEMUSnapshotInfo { char id_str[128]; /* unique snapshot id */ @@ -61,5 +69,10 @@ void bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, int bdrv_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_info); int bdrv_snapshot_load_tmp(BlockDriverState *bs, - const char *snapshot_name); + const char *snapshot_id, + const char *name, + Error **errp); +int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs, + const char *id_or_name, + Error **errp); #endif |