]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildMemoryBackendStr: Don't overwrite @force
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Mar 2017 14:56:36 +0000 (15:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Mar 2017 09:49:19 +0000 (10:49 +0100)
This is an input argument. We should not overwrite it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c

index b484b7ba0716559d42af5f34c595f81d4fbd1209..b30bb670f8e4f70028c92d9326890d1da1b42720 100644 (file)
@@ -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;