[libvirt PATCH 3/4] vmx: expand the disk array
Pino Toscano
ptoscano at redhat.com
Mon Oct 12 15:13:47 UTC 2020
Account for the possible SATA disks too, which means 120 potential
disks.
This means the size of the array triples, however that is unavoidable
with the current way of reading disks.
Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
src/vmx/vmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 0ec6222f50..6e4b455794 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1645,8 +1645,8 @@ virVMXParseConfig(virVMXContext *ctx,
if (def->graphics[def->ngraphics] != NULL)
++def->ngraphics;
- /* def:disks: 4 * 15 scsi + 2 * 2 ide + 2 floppy = 66 */
- def->disks = g_new0(virDomainDiskDefPtr, 66);
+ /* def:disks: 4 * 15 scsi + 4 * 30 sata + 2 * 2 ide + 2 floppy = 186 */
+ def->disks = g_new0(virDomainDiskDefPtr, 186);
def->ndisks = 0;
/* def:disks (scsi) */
--
2.26.2
More information about the libvir-list
mailing list