[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source



On Tue, Jul 23, 2013 at 03:22:54PM +0200, Paolo Bonzini wrote:
> Il 22/07/2013 12:30, Osier Yang ha scritto:
> > +        def->srcpool->pooltype = pooldef->type;
> > +        if (pooldef->type == VIR_STORAGE_POOL_ISCSI) {
> > +            /* Default to use the LUN's path on host */
> > +            if (!def->srcpool->mode)
> > +                def->srcpool->mode =
> > VIR_DOMAIN_DISK_SOURCE_POOL_MODE_HOST;
> > +
> > +            if (def->srcpool->mode ==
> > +                VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT) {
> > +                if (qemuAddISCSIPoolSourceHost(def, pooldef) < 0)
> > +                    goto cleanup;
> > +            } else if (def->srcpool->mode ==
> > +                       VIR_DOMAIN_DISK_SOURCE_POOL_MODE_HOST) {
> > +                if (!(def->src = virStorageVolGetPath(vol)))
> > +                    goto cleanup;
> > +            }
> 
> Ok, this answers my question. :)
> 
> I think the default mode should be direct, because otherwise things such
> as persistent reservations do not work.

No, the default has to be host mode, because that is the only mode that
is guaranteed to be usable with any QEMU. The direct mode requires a
QEMU that is new enough, and a distro to have enabled it. We can't
rely on that as a default choice.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]