[libvirt] [PATCH 3/3] qemu: Forbid migration with cache != none

Jiri Denemark jdenemar at redhat.com
Wed Feb 22 13:57:51 UTC 2012


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




More information about the libvir-list mailing list