[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/12] vpc: Add migration blocker
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 09/12] vpc: Add migration blocker |
Date: |
Fri, 25 Nov 2011 19:12:12 +0100 |
vpc caches the BAT. For migration to work, it would have to be
invalidated. Block migration for now.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vpc.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 39a3247..75d7d4a 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -25,6 +25,7 @@
#include "qemu-common.h"
#include "block_int.h"
#include "module.h"
+#include "migration.h"
/**************************************************************/
@@ -128,6 +129,8 @@ typedef struct BDRVVPCState {
uint64_t last_bitmap;
#endif
+
+ Error *migration_blocker;
} BDRVVPCState;
static uint32_t vpc_checksum(uint8_t* buf, size_t size)
@@ -228,6 +231,13 @@ static int vpc_open(BlockDriverState *bs, int flags)
#endif
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;
fail:
return err;
@@ -651,6 +661,9 @@ static void vpc_close(BlockDriverState *bs)
#ifdef CACHE
g_free(s->pageentry_u8);
#endif
+
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
}
static QEMUOptionParameter vpc_create_options[] = {
--
1.7.6.4
- [Qemu-devel] [PATCH 02/12] usb-msd: do not register twice in the boot order, (continued)
- [Qemu-devel] [PATCH 02/12] usb-msd: do not register twice in the boot order, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 04/12] scsi-generic: add as boot device, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 03/12] scsi: fix fw path, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 05/12] sheepdog: Avoid deadlock in error path, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 06/12] qcow: Add migration blocker, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 07/12] vdi: Add migration blocker, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 08/12] vmdk: Add migration blocker, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 10/12] vvfat: Add migration blocker, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 12/12] vpc: Add missing error handling in alloc_block, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 11/12] vdi: Fix memory leak, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 09/12] vpc: Add migration blocker,
Kevin Wolf <=
- Re: [Qemu-devel] [PULL 00/12] Block patches for 1.0, Anthony Liguori, 2011/11/28