
22 Feb
2012
22 Feb
'12
1:57 p.m.
On Wed, Feb 22, 2012 at 14:58:31 +0800, Shu Ming wrote:
On 2012-2-22 0:17, Jiri Denemark wrote:
@@ -817,6 +817,27 @@ qemuMigrationIsAllowed(struct qemud_driver *driver, virDomainObjPtr vm, return true; }
+static bool +qemuMigrationIsSafe(virDomainDefPtr def) +{ + int i; + + for (i = 0 ; i< def->ndisks ; i++) { + virDomainDiskDefPtr disk = def->disks[i]; + + /* shared&& !readonly implies cache=none */ + if (disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE&&
how about disk write through flag here? This flag should also imply cache=none.
i.e, VIR_DOMAIN_DISK_CACHE_WRITETHRU
AFAIK, only VIR_DOMAIN_DISK_CACHE_DISABLE translates into cache=none unless qemu binary is old enough to only support cache=on|off Jirka