Codebase list libvirt / 9515e28
Only check for cluster fs if we're using a filesystem Closes: #676328 Guido Günther 11 years ago
2 changed file(s) with 44 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Wed, 6 Jun 2012 20:36:31 +0200
2 Subject: Only check for cluster fs if we're using a filesystem
3
4 otherwise migration fails for e.g. network filesystems like sheepdog
5 with:
6
7 error: Invalid relative path 'virt-name': Invalid argument
8
9 while we should fail with:
10
11 Migration may lead to data corruption if disks use cache != none
12
13 References:
14
15 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676328
16 https://www.redhat.com/archives/libvirt-users/2012-May/msg00088.html
17 ---
18 src/qemu/qemu_migration.c | 11 +++++++----
19 1 file changed, 7 insertions(+), 4 deletions(-)
20
21 diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
22 index 6f42823..a20f05c 100644
23 --- a/src/qemu/qemu_migration.c
24 +++ b/src/qemu/qemu_migration.c
25 @@ -840,10 +840,13 @@ qemuMigrationIsSafe(virDomainDefPtr def)
26 !disk->readonly &&
27 disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
28 int cfs;
29 - if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
30 - continue;
31 - else if (cfs < 0)
32 - return false;
33 +
34 + if (disk->type == VIR_DOMAIN_DISK_TYPE_FILE) {
35 + if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
36 + continue;
37 + else if (cfs < 0)
38 + return false;
39 + }
40
41 qemuReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",
42 _("Migration may lead to data corruption if disks"
88 Disable-gnulib-s-test-nonplocking-pipe.sh.patch
99 Disable-failing-virnetsockettest.patch
1010 Don-t-fail-if-we-can-t-setup-avahi.patch
11 Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch