diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 17:29:04 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 17:29:04 +0000 |
| commit | 8ff7fd8a29e62e685b3977f6db2c2f3661e96da9 (patch) | |
| tree | a3cca59321ecb1bd64fce6048ffc37b85e324c3b /include | |
| parent | 6bc56d317f7b5004ea2d89d264bddc8b4d081700 (diff) | |
| parent | aa2623d817e7ecb62fd917e475ccc0d42dd1a413 (diff) | |
| download | focaccia-qemu-8ff7fd8a29e62e685b3977f6db2c2f3661e96da9.tar.gz focaccia-qemu-8ff7fd8a29e62e685b3977f6db2c2f3661e96da9.zip | |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches # gpg: Signature made Mon 31 Oct 2016 16:10:07 GMT # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (29 commits) qapi: allow blockdev-add for NFS block/nfs: Introduce runtime_opts in NFS block: Mention replication in BlockdevDriver enum docs qemu-iotests: test 'offset' and 'size' options in raw driver raw_bsd: add offset and size options qemu-iotests: Test the 'base-node' parameter of 'block-stream' block: Add 'base-node' parameter to the 'block-stream' command qemu-iotests: Test streaming to a Quorum child qemu-iotests: Add iotests.supports_quorum() qemu-iotests: Test block-stream and block-commit in parallel qemu-iotests: Test overlapping stream and commit operations qemu-iotests: Test block-stream operations in parallel qemu-iotests: Test streaming to an intermediate layer docs: Document how to stream to an intermediate layer block: Add QMP support for streaming to an intermediate layer block: Support streaming to an intermediate layer block: Block all intermediate nodes in commit_active_start() block: Block all nodes involved in the block-commit operation block: Check blockers in all nodes involved in a block-commit job block: Use block_job_add_bdrv() in backup_start() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block.h | 2 | ||||
| -rw-r--r-- | include/block/blockjob.h | 14 | ||||
| -rw-r--r-- | include/qemu/sockets.h | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index b7dc7d54ae..b81a3e35ce 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -332,6 +332,8 @@ int bdrv_flush_all(void); void bdrv_close_all(void); void bdrv_drain(BlockDriverState *bs); void coroutine_fn bdrv_co_drain(BlockDriverState *bs); +void bdrv_drain_all_begin(void); +void bdrv_drain_all_end(void); void bdrv_drain_all(void); #define BDRV_POLL_WHILE(bs, cond) ({ \ diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 2bb39f4d29..4dfb16b43f 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -188,6 +188,9 @@ struct BlockJob { /** Block other operations when block job is running */ Error *blocker; + /** BlockDriverStates that are involved in this block job */ + GSList *nodes; + /** The opaque value that is passed to the completion function. */ void *opaque; @@ -253,6 +256,17 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver, BlockCompletionFunc *cb, void *opaque, Error **errp); /** + * block_job_add_bdrv: + * @job: A block job + * @bs: A BlockDriverState that is involved in @job + * + * Add @bs to the list of BlockDriverState that are involved in + * @job. This means that all operations will be blocked on @bs while + * @job exists. + */ +void block_job_add_bdrv(BlockJob *job, BlockDriverState *bs); + +/** * block_job_sleep_ns: * @job: The job that calls the function. * @clock: The clock to sleep on. diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 9eb24707df..5589e6842b 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -34,6 +34,8 @@ typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque); InetSocketAddress *inet_parse(const char *str, Error **errp); int inet_connect(const char *str, Error **errp); +int inet_connect_saddr(InetSocketAddress *saddr, Error **errp, + NonBlockingConnectHandler *callback, void *opaque); NetworkAddressFamily inet_netfamily(int family); |