mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
b433d9424d
commit
1a8ae82217
2 changed files with 64 additions and 26 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue