diff options
author | Anthony Liguori <aliguori@amazon.com> | 2013-12-07 07:35:31 -0800 |
---|---|---|
committer | Anthony Liguori <aliguori@amazon.com> | 2013-12-07 07:35:31 -0800 |
commit | 93531372f0f74bb4d886480c0c8aa0e4ca6f5423 (patch) | |
tree | be13df35b2e689f031eef40bc06311b91bfc3548 /include | |
parent | 0c0cb6a2378f937410f5f55cbf3e3b2c20f293c6 (diff) | |
parent | ac9524dc55dc32e492ac3e6fbc9785be7168f8a2 (diff) |
Merge remote-tracking branch 'stefanha/block' into staging
# By Paolo Bonzini (17) and others
# Via Stefan Hajnoczi
* stefanha/block: (48 commits)
qemu-iotests: filter QEMU monitor \r\n
aio: make aio_poll(ctx, true) block with no fds
block: clean up bdrv_drain_all() throttling comments
qcow2: use start_of_cluster() and offset_into_cluster() everywhere
qemu-img: decrease progress update interval on convert
qemu-img: round down request length to an aligned sector
qemu-img: dynamically adjust iobuffer size during convert
block/iscsi: set bs->bl.opt_transfer_length
block: add opt_transfer_length to BlockLimits
block/iscsi: set bdi->cluster_size
qemu-img: fix usage instruction for qemu-img convert
qemu-img: add support for skipping zeroes in input during convert
qemu-nbd: add doc for option -f
qemu-iotests: add test for snapshot in qemu-img convert
qemu-img: add -l for snapshot in convert
qemu-iotests: add 058 internal snapshot export with qemu-nbd case
qemu-nbd: support internal snapshot export
snapshot: distinguish id and name in load_tmp
qemu-iotests: Split qcow2 only cases in 048
qemu-iotests: Clean up spaces in usage output
...
Message-id: 1386347807-27359-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
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 |