From: Joel SIMOES <joel.simoes(a)laposte.net>
---
src/qemu/qemu_conf.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index dfafcdc..954542a 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1215,17 +1215,13 @@ qemuAddSheepPoolSourceHost(virDomainDiskDefPtr def,
7000) < 0)
goto cleanup;
-
-
-
-
/* Storage pool have not supported these 2 attributes yet,
* use the defaults.
*/
def->hosts[0].transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP;
def->hosts[0].socket = NULL;
-
+
def->protocol = VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG;
ret = 0;
@@ -1402,15 +1398,14 @@ qemuTranslateDiskSourcePool(virConnectPtr conn,
def->srcpool->pooltype = pooldef->type;
def->srcpool->voltype = info.type;
-
- if (def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI
&& !(def->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT
&& pooldef->type == VIR_STORAGE_POOL_SHEEPDOG) ) {
-
+
+ if (def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI
&& !(def->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT
&& pooldef->type == VIR_STORAGE_POOL_SHEEPDOG)) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("disk source mode is only valid when "
"storage pool is of iscsi type or only direct for sheepdog
"));
goto cleanup;
}
-
+
VIR_FREE(def->src);
virDomainDiskHostDefFree(def->nhosts, def->hosts);
virDomainDiskAuthClear(def);
@@ -1496,11 +1491,10 @@ qemuTranslateDiskSourcePool(virConnectPtr conn,
def->srcpool->mode = VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT;
def->protocol = VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG;
def->src = virStorageVolGetPath(vol);
-
qemuAddSheepPoolSourceHost(def, pooldef);
break;
case VIR_STORAGE_POOL_MPATH:
- case VIR_STORAGE_POOL_RBD:
+ case VIR_STORAGE_POOL_RBD:
case VIR_STORAGE_POOL_GLUSTER:
case VIR_STORAGE_POOL_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
--
1.8.3.2