From 5a8a30db4771675480829d7d3bf35a138e9c35f1 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 12 Mar 2014 15:59:16 +0100 Subject: block: Add error handling to bdrv_invalidate_cache() If it returns an error, the migrated VM will not be started, but qemu exits with an error message. Signed-off-by: Kevin Wolf Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: Benoit Canet --- include/block/block.h | 4 ++-- include/block/block_int.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index bd34d14109..1ed55d839a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -329,8 +329,8 @@ BlockDriverAIOCB *bdrv_aio_ioctl(BlockDriverState *bs, BlockDriverCompletionFunc *cb, void *opaque); /* Invalidate any cached metadata used by image formats */ -void bdrv_invalidate_cache(BlockDriverState *bs); -void bdrv_invalidate_cache_all(void); +void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp); +void bdrv_invalidate_cache_all(Error **errp); void bdrv_clear_incoming_migration_all(void); diff --git a/include/block/block_int.h b/include/block/block_int.h index 4fc5ea8a65..cd5bc7308a 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -153,7 +153,7 @@ struct BlockDriver { /* * Invalidate any cached meta-data. */ - void (*bdrv_invalidate_cache)(BlockDriverState *bs); + void (*bdrv_invalidate_cache)(BlockDriverState *bs, Error **errp); /* * Flushes all data that was already written to the OS all the way down to -- cgit v1.2.3-55-g7522