]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Kill now unused virDomainDiskSourceIsBlockType
authorPeter Krempa <pkrempa@redhat.com>
Mon, 2 May 2016 13:07:34 +0000 (15:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 9 May 2016 11:16:26 +0000 (13:16 +0200)
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms

index 7c2cfcf9873a3d0edd51ea7ea8d4cdc3877bea3e..d7e74ec0202925b835b56238e228aec89f32a26d 100644 (file)
@@ -24076,58 +24076,6 @@ virDomainDefFindDevice(virDomainDefPtr def,
     return 0;
 }
 
-/**
- * virDomainDiskSourceIsBlockType:
- *
- * Check if the disk *source* is of block type. This just tries
- * to check from the type of disk def, not to probe the underlying
- * storage.
- *
- * Return true if its source is block type, or false otherwise.
- */
-bool
-virDomainDiskSourceIsBlockType(virStorageSourcePtr src,
-                               bool report)
-{
-    if (!src->path) {
-        if (report)
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("source path not found for device='lun' "
-                             "using type='%d'"), src->type);
-        return false;
-    }
-
-    if (src->type == VIR_STORAGE_TYPE_BLOCK)
-        return true;
-
-    /* For volume types, check the srcpool.
-     * If it's a block type source pool, then it's possible
-     */
-    if (src->type == VIR_STORAGE_TYPE_VOLUME &&
-        src->srcpool &&
-        src->srcpool->voltype == VIR_STORAGE_VOL_BLOCK) {
-        /* We don't think the volume accessed by remote URI is
-         * block type source, since we can't/shouldn't manage it
-         * (e.g. set sgio=filtered|unfiltered for it) in libvirt.
-         */
-         if (src->srcpool->pooltype == VIR_STORAGE_POOL_ISCSI &&
-             src->srcpool->mode == VIR_STORAGE_SOURCE_POOL_MODE_DIRECT) {
-             if (report)
-                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                                _("disk device='lun' for iSCSI is not "
-                                  "supported with mode='direct'."));
-             return false;
-         }
-
-        return true;
-    }
-    if (report)
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("disk device='lun' is only valid for block "
-                         "type disk source"));
-    return false;
-}
-
 
 char *
 virDomainObjGetMetadata(virDomainObjPtr vm,
index b82547750991ee240c9375c11d880cab7d8d369d..1e080621df40e17953bf217a974531f49d4eb275 100644 (file)
@@ -3127,9 +3127,6 @@ int virDomainDefFindDevice(virDomainDefPtr def,
                            virDomainDeviceDefPtr dev,
                            bool reportError);
 
-bool virDomainDiskSourceIsBlockType(virStorageSourcePtr src, bool report)
-    ATTRIBUTE_NONNULL(1);
-
 void virDomainChrSourceDefClear(virDomainChrSourceDefPtr def);
 
 char *virDomainObjGetMetadata(virDomainObjPtr vm,
index 9ad473dde4d298e246bd72f1aee3112ad3f1ad31..fff8c30af95f8176a8d9458b8a02a853e856b2a4 100644 (file)
@@ -290,7 +290,6 @@ virDomainDiskSetDriver;
 virDomainDiskSetFormat;
 virDomainDiskSetSource;
 virDomainDiskSetType;
-virDomainDiskSourceIsBlockType;
 virDomainFSDefFree;
 virDomainFSIndexByName;
 virDomainFSInsert;