storage: Add duplicate devices check for zfs pool def

Check proposed pool definitions to ensure they aren't trying to use the
same devices as currently defined definitions - disallow the duplicate
This commit is contained in:
John Ferlan 2015-04-02 12:50:07 -04:00
parent 2184ade3a0
commit 5817451947

View File

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