mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: Shared or readonly disks are always safe wrt migration
No matter what cache mode is used, readonly disks are always safe wrt migration. Shared disks are required to be readonly or to disable host-side cache, which makes them safe as well.
This commit is contained in:
parent
6c3642e9bc
commit
07dd6fb610
@ -828,10 +828,12 @@ qemuMigrationIsSafe(virDomainDefPtr def)
|
||||
for (i = 0 ; i < def->ndisks ; i++) {
|
||||
virDomainDiskDefPtr disk = def->disks[i];
|
||||
|
||||
/* shared && !readonly implies cache=none */
|
||||
/* Our code elsewhere guarantees shared disks are either readonly (in
|
||||
* which case cache mode doesn't matter) or used with cache=none */
|
||||
if (disk->src &&
|
||||
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE &&
|
||||
(disk->cachemode || !disk->shared || disk->readonly)) {
|
||||
!disk->shared &&
|
||||
!disk->readonly &&
|
||||
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
|
||||
int cfs;
|
||||
if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user