aboutsummaryrefslogtreecommitdiff
path: root/block/qed.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qed.c')
-rw-r--r--block/qed.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/block/qed.c b/block/qed.c
index d032a4574c..7e22e77b9d 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -16,6 +16,7 @@
#include "trace.h"
#include "qed.h"
#include "qerror.h"
+#include "migration.h"
static void qed_aio_cancel(BlockDriverAIOCB *blockacb)
{
@@ -504,6 +505,12 @@ static int bdrv_qed_open(BlockDriverState *bs, int flags)
s->need_check_timer = qemu_new_timer_ns(vm_clock,
qed_need_check_timer_cb, s);
+ error_set(&s->migration_blocker,
+ QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED,
+ "qed", bs->device_name, "live migration");
+ migrate_add_blocker(s->migration_blocker);
+
+
out:
if (ret) {
qed_free_l2_cache(&s->l2_cache);
@@ -516,6 +523,9 @@ static void bdrv_qed_close(BlockDriverState *bs)
{
BDRVQEDState *s = bs->opaque;
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
+
qed_cancel_need_check_timer(s);
qemu_free_timer(s->need_check_timer);