mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: Do not report unsafe migration for local files
When migrating a domain with disk images stored locally (and using storage migration), we should not complain about unsafe migration no matter what cache policy is used for that disk.
This commit is contained in:
parent
b83b31d87a
commit
88624b5d4c
@ -1477,13 +1477,17 @@ qemuMigrationIsSafe(virDomainDefPtr def)
|
||||
!disk->shared &&
|
||||
!disk->readonly &&
|
||||
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
|
||||
int cfs;
|
||||
int rc;
|
||||
|
||||
if (disk->type == VIR_DOMAIN_DISK_TYPE_FILE) {
|
||||
if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
|
||||
continue;
|
||||
else if (cfs < 0)
|
||||
if ((rc = virStorageFileIsSharedFS(disk->src)) < 0)
|
||||
return false;
|
||||
else if (rc == 0)
|
||||
continue;
|
||||
if ((rc = virStorageFileIsClusterFS(disk->src)) < 0)
|
||||
return false;
|
||||
else if (rc == 1)
|
||||
continue;
|
||||
} else if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK &&
|
||||
disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_RBD) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user