[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.9.12-1-1-g9515e28

Guido Günther agx at sigxcpu.org
Fri Jun 8 18:30:58 UTC 2012


The following commit has been merged in the experimental branch:
commit 9515e285f3a350b1df3668ac3c66c9d39245ca99
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Jun 8 20:29:50 2012 +0200

    Only check for cluster fs if we're using a filesystem
    
    Closes: #676328

diff --git a/debian/patches/Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch b/debian/patches/Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch
new file mode 100644
index 0000000..525ae18
--- /dev/null
+++ b/debian/patches/Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch
@@ -0,0 +1,43 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Wed, 6 Jun 2012 20:36:31 +0200
+Subject: Only check for cluster fs if we're using a filesystem
+
+otherwise migration fails for e.g. network filesystems like sheepdog
+with:
+
+   error: Invalid relative path 'virt-name': Invalid argument
+
+while we should fail with:
+
+    Migration may lead to data corruption if disks use cache != none
+
+References:
+
+    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676328
+    https://www.redhat.com/archives/libvirt-users/2012-May/msg00088.html
+---
+ src/qemu/qemu_migration.c |   11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
+index 6f42823..a20f05c 100644
+--- a/src/qemu/qemu_migration.c
++++ b/src/qemu/qemu_migration.c
+@@ -840,10 +840,13 @@ qemuMigrationIsSafe(virDomainDefPtr def)
+             !disk->readonly &&
+             disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
+             int cfs;
+-            if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
+-                continue;
+-            else if (cfs < 0)
+-                return false;
++
++            if (disk->type == VIR_DOMAIN_DISK_TYPE_FILE) {
++                if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
++                    continue;
++                else if (cfs < 0)
++                    return false;
++            }
+ 
+             qemuReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",
+                             _("Migration may lead to data corruption if disks"
diff --git a/debian/patches/series b/debian/patches/series
index 2081602..7b7213e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ virsh-Initialize-library-before-calling-virResetLast.patch
 Disable-gnulib-s-test-nonplocking-pipe.sh.patch
 Disable-failing-virnetsockettest.patch
 Don-t-fail-if-we-can-t-setup-avahi.patch
+Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list