struct _virDomainDiskHostDef recently got new members to support transport and socket attributes. Consumers of this struct therefore needs to initialize default values for them. This patch initializes default values for transport and socket for nbd, rbd and sheepdog storage backends. Signed-off-by: Harsh Prateek Bora <harsh@xxxxxxxxxxxxxxxxxx> --- src/qemu/qemu_command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a377744..af2fcd5 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1940,6 +1940,10 @@ static int qemuAddRBDHost(virDomainDiskDefPtr disk, char *hostport) disk->hosts[disk->nhosts-1].name = strdup(hostport); if (!disk->hosts[disk->nhosts-1].name) goto no_memory; + + disk->hosts[disk->nhosts-1].transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP; + disk->hosts[disk->nhosts-1].socket = NULL; + return 0; no_memory: @@ -7087,6 +7091,8 @@ qemuParseCommandLineDisk(virCapsPtr caps, virReportOOMError(); goto cleanup; } + def->hosts->transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP; + def->hosts->socket = NULL; VIR_FREE(def->src); def->src = NULL; } else if (STRPREFIX(def->src, "rbd:")) { @@ -7145,6 +7151,8 @@ qemuParseCommandLineDisk(virCapsPtr caps, virReportOOMError(); goto cleanup; } + def->hosts->transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP; + def->hosts->socket = NULL; def->src = strdup(vdi); if (!def->src) { @@ -8848,6 +8856,9 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, VIR_FREE(hosts); goto no_memory; } + first_rbd_disk->hosts[first_rbd_disk->nhosts].transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP; + first_rbd_disk->hosts[first_rbd_disk->nhosts].socket = NULL; + first_rbd_disk->nhosts++; token = strtok_r(NULL, ",", &saveptr); } -- 1.7.11.7 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list