提交 4346c9eb 编写于 作者: M Michal Privoznik

qemuBuildMemoryBackendStr: Don't overwrite @force

This is an input argument. We should not overwrite it.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 32b67545
......@@ -3302,7 +3302,6 @@ qemuBuildMemoryBackendStr(unsigned long long size,
if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) {
/* we can have both pagesize and mem source, then check mem source first */
force = true;
if (virJSONValueObjectAdd(props,
"s:mem-path", cfg->memoryBackingDir,
NULL) < 0)
......@@ -3372,7 +3371,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
}
/* If none of the following is requested... */
if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified && !force) {
if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified &&
def->mem.source != VIR_DOMAIN_MEMORY_SOURCE_FILE && !force) {
/* report back that using the new backend is not necessary
* to achieve the desired configuration */
ret = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册