vpc: Add migration blocker
vpc caches the BAT. For migration to work, it would have to be invalidated. Block migration for now. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
2bc3166c22
commit
612ff3d887
13
block/vpc.c
13
block/vpc.c
@ -25,6 +25,7 @@
|
|||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "block_int.h"
|
#include "block_int.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
|
#include "migration.h"
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
|
||||||
@ -128,6 +129,8 @@ typedef struct BDRVVPCState {
|
|||||||
|
|
||||||
uint64_t last_bitmap;
|
uint64_t last_bitmap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Error *migration_blocker;
|
||||||
} BDRVVPCState;
|
} BDRVVPCState;
|
||||||
|
|
||||||
static uint32_t vpc_checksum(uint8_t* buf, size_t size)
|
static uint32_t vpc_checksum(uint8_t* buf, size_t size)
|
||||||
@ -228,6 +231,13 @@ static int vpc_open(BlockDriverState *bs, int flags)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
qemu_co_mutex_init(&s->lock);
|
qemu_co_mutex_init(&s->lock);
|
||||||
|
|
||||||
|
/* Disable migration when VHD images are used */
|
||||||
|
error_set(&s->migration_blocker,
|
||||||
|
QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED,
|
||||||
|
"vpc", bs->device_name, "live migration");
|
||||||
|
migrate_add_blocker(s->migration_blocker);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
fail:
|
fail:
|
||||||
return err;
|
return err;
|
||||||
@ -651,6 +661,9 @@ static void vpc_close(BlockDriverState *bs)
|
|||||||
#ifdef CACHE
|
#ifdef CACHE
|
||||||
g_free(s->pageentry_u8);
|
g_free(s->pageentry_u8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
migrate_del_blocker(s->migration_blocker);
|
||||||
|
error_free(s->migration_blocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QEMUOptionParameter vpc_create_options[] = {
|
static QEMUOptionParameter vpc_create_options[] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user