]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Add duplicate devices check for zfs pool def
authorJohn Ferlan <jferlan@redhat.com>
Thu, 2 Apr 2015 16:50:07 +0000 (12:50 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Apr 2015 10:51:20 +0000 (06:51 -0400)
Check proposed pool definitions to ensure they aren't trying to use the
same devices as currently defined definitions - disallow the duplicate

src/conf/storage_conf.c

index a4e676193158babcf969fdf619a2fc84020703e5..4852dfbf022314b59f64ebb050b73b2bc326b1e2 100644 (file)
@@ -2543,6 +2543,7 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
         case VIR_STORAGE_POOL_FS:
         case VIR_STORAGE_POOL_LOGICAL:
         case VIR_STORAGE_POOL_DISK:
+        case VIR_STORAGE_POOL_ZFS:
             matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
             break;
         case VIR_STORAGE_POOL_SHEEPDOG:
@@ -2552,7 +2553,6 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
             break;
         case VIR_STORAGE_POOL_MPATH:
         case VIR_STORAGE_POOL_RBD:
-        case VIR_STORAGE_POOL_ZFS:
         case VIR_STORAGE_POOL_LAST:
             break;
         }