diff options
| author | Kevin Wolf | 2016-06-09 16:24:44 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2016-06-16 15:19:56 +0200 |
| commit | 1a8ae8221799901dc399a174b52a970d8e6f976a (patch) | |
| tree | bb242811e2114c25bf72101c3db47ce89fc235a4 /include/block | |
| parent | block: Allow .bdrv_load/save_vmstate() to return 0/-errno (diff) | |
| download | qemu-1a8ae8221799901dc399a174b52a970d8e6f976a.tar.gz qemu-1a8ae8221799901dc399a174b52a970d8e6f976a.tar.xz qemu-1a8ae8221799901dc399a174b52a970d8e6f976a.zip | |
block: Make bdrv_load/save_vmstate coroutine_fns
This allows drivers to share code between normal I/O and vmstate
accesses.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
| -rw-r--r-- | include/block/block_int.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index f9a32cc5c5..1fe0811a65 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -224,10 +224,12 @@ struct BlockDriver { int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs); - int (*bdrv_save_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov, - int64_t pos); - int (*bdrv_load_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov, - int64_t pos); + int coroutine_fn (*bdrv_save_vmstate)(BlockDriverState *bs, + QEMUIOVector *qiov, + int64_t pos); + int coroutine_fn (*bdrv_load_vmstate)(BlockDriverState *bs, + QEMUIOVector *qiov, + int64_t pos); int (*bdrv_change_backing_file)(BlockDriverState *bs, const char *backing_file, const char *backing_fmt); |
