提交 60a2ce49 编写于 作者: P Peter Krempa

conf: numa: Improve error message in case a numa node doesn't have cpus

Currently the code would exit without reporting an error as
virBitmapParse reports one only if it fails to parse the bitmap, whereas
the code was jumping to the error label even in case 0 cpus were
correctly parsed in the map.
上级 6b616632
...@@ -749,9 +749,14 @@ virDomainNumaDefCPUParseXML(virCPUDefPtr def, ...@@ -749,9 +749,14 @@ virDomainNumaDefCPUParseXML(virCPUDefPtr def,
} }
if (virBitmapParse(tmp, 0, &def->cells[cur_cell].cpumask, if (virBitmapParse(tmp, 0, &def->cells[cur_cell].cpumask,
VIR_DOMAIN_CPUMASK_LEN) <= 0) VIR_DOMAIN_CPUMASK_LEN) < 0)
goto cleanup; goto cleanup;
if (virBitmapIsAllClear(def->cells[cur_cell].cpumask)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("NUMA cell %d has no vCPUs assigned"), cur_cell);
goto cleanup;
}
VIR_FREE(tmp); VIR_FREE(tmp);
ctxt->node = nodes[i]; ctxt->node = nodes[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册