mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
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 (cherry picked from commit 3ac8fb54f4e6365e6252eae9995fb8333972ae94)
This commit is contained in:
parent
84daddb0b9
commit
95ae1a06bc
@ -840,10 +840,13 @@ qemuMigrationIsSafe(virDomainDefPtr def)
|
|||||||
!disk->readonly &&
|
!disk->readonly &&
|
||||||
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
|
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
|
||||||
int cfs;
|
int cfs;
|
||||||
if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
|
|
||||||
continue;
|
if (disk->type == VIR_DOMAIN_DISK_TYPE_FILE) {
|
||||||
else if (cfs < 0)
|
if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
|
||||||
return false;
|
continue;
|
||||||
|
else if (cfs < 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
qemuReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",
|
qemuReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",
|
||||||
_("Migration may lead to data corruption if disks"
|
_("Migration may lead to data corruption if disks"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user