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

Paolo Bonzini pbonzini at redhat.com
Tue Jul 23 13:22:54 UTC 2013


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.

Paolo




More information about the libvir-list mailing list