render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 5ae52dc252691262663129e52dbf1a775cd92bb8 Mon Sep 17 00:00:00 2001
Message-Id: <5ae52dc252691262663129e52dbf1a775cd92bb8@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Wed, 4 Mar 2020 12:42:45 +0100
Subject: [PATCH] qemu: forbid migration with vhost-user-fs device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is not yet supported.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 5c0444a38bb37ddeb7049683ef72d02beab9e617)
Signed-off-by: Ján Tomko <jtomko@redhat.com>

Conflicts: * downstream is missing commit 739bb1f26f9797f69023e221bef7c004adb9c522
    qemu_migration: Rearrange some checks in qemuMigrationSrcIsAllowed()
  src/qemu/qemu_migration.c
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
Message-Id: <426a6270b1e0265b4977ad70029342ca43f7ff48.1583322091.git.jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_migration.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 03f058051d..a677e270d4 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1281,6 +1281,16 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
                            _("migration with shmem device is not supported"));
             return false;
         }
+
+        for (i = 0; i < vm->def->nfss; i++) {
+            virDomainFSDefPtr fs = vm->def->fss[i];
+
+            if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) {
+                virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+                               _("migration with virtiofs device is not supported"));
+                return false;
+            }
+        }
     }
 
     return true;
-- 
2.25.1