[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/12] vmdk: Add migration blocker
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 08/12] vmdk: Add migration blocker |
Date: |
Fri, 25 Nov 2011 19:12:11 +0100 |
VMDK caches L2 tables. For migration to work, they would have to be
invalidated. Block migration for now.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vmdk.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 96f7d5d..f544159 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -26,6 +26,7 @@
#include "qemu-common.h"
#include "block_int.h"
#include "module.h"
+#include "migration.h"
#include <zlib.h>
#define VMDK3_MAGIC (('C' << 24) | ('O' << 16) | ('W' << 8) | 'D')
@@ -97,6 +98,7 @@ typedef struct BDRVVmdkState {
int num_extents;
/* Extent array with num_extents entries, ascend ordered by address */
VmdkExtent *extents;
+ Error *migration_blocker;
} BDRVVmdkState;
typedef struct VmdkMetaData {
@@ -659,7 +661,14 @@ static int vmdk_open(BlockDriverState *bs, int flags)
}
s->parent_cid = vmdk_read_cid(bs, 1);
qemu_co_mutex_init(&s->lock);
- return ret;
+
+ /* Disable migration when VMDK images are used */
+ error_set(&s->migration_blocker,
+ QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED,
+ "vmdk", bs->device_name, "live migration");
+ migrate_add_blocker(s->migration_blocker);
+
+ return 0;
fail:
vmdk_free_extents(bs);
@@ -1504,7 +1513,12 @@ exit:
static void vmdk_close(BlockDriverState *bs)
{
+ BDRVVmdkState *s = bs->opaque;
+
vmdk_free_extents(bs);
+
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
}
static coroutine_fn int vmdk_co_flush(BlockDriverState *bs)
--
1.7.6.4
- [Qemu-devel] [PULL 00/12] Block patches for 1.0, Kevin Wolf, 2011/11/25
- [Qemu-devel] [PATCH 01/12] virtio-blk: fix cross-endian config space, Kevin Wolf, 2011/11/25
- [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 <=
- [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, 2011/11/25
- Re: [Qemu-devel] [PULL 00/12] Block patches for 1.0, Anthony Liguori, 2011/11/28