[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/8] block: vhdx - add migration blocker
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 4/8] block: vhdx - add migration blocker |
Date: |
Mon, 7 Oct 2013 13:28:05 +0200 |
From: Jeff Cody <address@hidden>
This blocks migration for VHDX image files, until the
functionality can be supported.
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/vhdx.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block/vhdx.c b/block/vhdx.c
index b8aa49c..6cb0412 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -20,6 +20,7 @@
#include "qemu/module.h"
#include "qemu/crc32c.h"
#include "block/vhdx.h"
+#include "migration/migration.h"
/* Several metadata and region table data entries are identified by
@@ -159,6 +160,7 @@ typedef struct BDRVVHDXState {
VHDXParentLocatorHeader parent_header;
VHDXParentLocatorEntry *parent_entries;
+ Error *migration_blocker;
} BDRVVHDXState;
uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
@@ -806,6 +808,12 @@ static int vhdx_open(BlockDriverState *bs, QDict *options,
int flags,
/* TODO: differencing files, write */
+ /* Disable migration when VHDX images are used */
+ error_set(&s->migration_blocker,
+ QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED,
+ "vhdx", bs->device_name, "live migration");
+ migrate_add_blocker(s->migration_blocker);
+
return 0;
fail:
qemu_vfree(s->headers[0]);
@@ -952,6 +960,8 @@ static void vhdx_close(BlockDriverState *bs)
qemu_vfree(s->headers[1]);
qemu_vfree(s->bat);
qemu_vfree(s->parent_entries);
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
}
static BlockDriver bdrv_vhdx = {
--
1.8.3.1
- [Qemu-devel] [PULL 0/8] Block patches, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 1/8] qcow2: Correct endianness in overlap check, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 2/8] qcow2: CHECK_OFLAG_COPIED is obsolete, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 3/8] block: use correct filename for error report, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 4/8] block: vhdx - add migration blocker,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 6/8] qcow2: Free allocated L2 cluster on error, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 5/8] qcow2: Switch L1 table in a single sequence, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 7/8] qemu-iotests: Correct 026 output, Stefan Hajnoczi, 2013/10/07
- [Qemu-devel] [PULL 8/8] block: use correct filename, Stefan Hajnoczi, 2013/10/07