diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-09-13 14:31:18 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-09-13 14:31:18 +0100 |
commit | 4dfbe3767af503a4cd137b15c8a9d8f30b20a6e9 (patch) | |
tree | 3e58ae8614b0f372f8fe4f4bb27b85263c3e4934 /include | |
parent | fa9701240951093907076db0943f96972a396ef5 (diff) | |
parent | dce8921b2baaf95974af8176406881872067adfa (diff) | |
download | qemu-4dfbe3767af503a4cd137b15c8a9d8f30b20a6e9.zip qemu-4dfbe3767af503a4cd137b15c8a9d8f30b20a6e9.tar.gz qemu-4dfbe3767af503a4cd137b15c8a9d8f30b20a6e9.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
v2:
* Fixed qcow2 sanitizer warnings [Peter]
* Renamed get_error test cases to get_error_all to avoid tripping "error:"
grep scripts [Peter]
* Added Fam's iothread stop patch
# gpg: Signature made Tue 13 Sep 2016 11:02:30 BST
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
iothread: Stop threads before main() quits
tests: fix qvirtqueue_kick
MAINTAINERS: add maintainer for replication
support replication driver in blockdev-add
tests: add unit test case for replication
replication: Implement new driver for block replication
replication: Introduce new APIs to do replication operation
configure: support replication
mirror: auto complete active commit
docs: block replication's description
block: Link backup into block core
Backup: export interfaces for extra serialization
Backup: clear all bitmap when doing block checkpoint
block: unblock backup operations in backing file
virtio-blk: rename virtio_device_info to virtio_blk_info
linux-aio: process completions from ioq_submit()
linux-aio: split processing events function
linux-aio: consume events in userspace instead of calling io_getevents
qcow2: avoid memcpy(dst, NULL, len)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_backup.h | 39 | ||||
-rw-r--r-- | include/block/block_int.h | 3 | ||||
-rw-r--r-- | include/sysemu/iothread.h | 1 |
3 files changed, 42 insertions, 1 deletions
diff --git a/include/block/block_backup.h b/include/block/block_backup.h new file mode 100644 index 0000000..8a75947 --- /dev/null +++ b/include/block/block_backup.h @@ -0,0 +1,39 @@ +/* + * QEMU backup + * + * Copyright (c) 2013 Proxmox Server Solutions + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD. + * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2016 FUJITSU LIMITED + * + * Authors: + * Dietmar Maurer <dietmar@proxmox.com> + * Changlong Xie <xiecl.fnst@cn.fujitsu.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef BLOCK_BACKUP_H +#define BLOCK_BACKUP_H + +#include "block/block_int.h" + +typedef struct CowRequest { + int64_t start; + int64_t end; + QLIST_ENTRY(CowRequest) list; + CoQueue wait_queue; /* coroutines blocked on this request */ +} CowRequest; + +void backup_wait_for_overlapping_requests(BlockJob *job, int64_t sector_num, + int nb_sectors); +void backup_cow_request_begin(CowRequest *req, BlockJob *job, + int64_t sector_num, + int nb_sectors); +void backup_cow_request_end(CowRequest *req); + +void backup_do_checkpoint(BlockJob *job, Error **errp); + +#endif diff --git a/include/block/block_int.h b/include/block/block_int.h index 0ca6a78..713cea6 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -702,13 +702,14 @@ void commit_start(const char *job_id, BlockDriverState *bs, * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. * @errp: Error object. + * @auto_complete: Auto complete the job. * */ void commit_active_start(const char *job_id, BlockDriverState *bs, BlockDriverState *base, int64_t speed, BlockdevOnError on_error, BlockCompletionFunc *cb, - void *opaque, Error **errp); + void *opaque, Error **errp, bool auto_complete); /* * mirror_start: * @job_id: The id of the newly-created job, or %NULL to use the diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index 2eefea1..68ac2de 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -35,5 +35,6 @@ typedef struct { char *iothread_get_id(IOThread *iothread); AioContext *iothread_get_aio_context(IOThread *iothread); +void iothread_stop_all(void); #endif /* IOTHREAD_H */ |