[libvirt] [PATCH 7/9] storage: Add duplicate host check for Sheepdog pool def
John Ferlan
jferlan at redhat.com
Thu Apr 2 17:39:44 UTC 2015
Check proposed pool definitions to ensure they aren't trying to use the
same host as currently defined definitions - disallow the duplicate
Signed-off-by: John Ferlan <jferlan at redhat.com>
---
src/conf/storage_conf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 5f1c151..5db7478 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -2427,9 +2427,12 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
case VIR_STORAGE_POOL_DISK:
matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
break;
+ case VIR_STORAGE_POOL_SHEEPDOG:
+ if (matchPoolSourceHost(&pool->def->source, &def->source))
+ matchpool = pool;
+ break;
case VIR_STORAGE_POOL_MPATH:
case VIR_STORAGE_POOL_RBD:
- case VIR_STORAGE_POOL_SHEEPDOG:
case VIR_STORAGE_POOL_GLUSTER:
case VIR_STORAGE_POOL_ZFS:
case VIR_STORAGE_POOL_LAST:
--
2.1.0
More information about the libvir-list
mailing list