mirror of https://gitee.com/openkylin/libvirt.git
qemuBuildMemoryBackendStr: Don't overwrite @force
This is an input argument. We should not overwrite it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
32b675456e
commit
4346c9eb97
src/qemu
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue