[libvirt] [PATCH v3 01/17] qemuBuildMemoryBackendStr: Don't overwrite @force

Michal Privoznik mprivozn at redhat.com
Thu Mar 9 16:06:10 UTC 2017


This is an input argument. We should not overwrite it.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/qemu/qemu_command.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6545a9325..f145cf9d8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3203,7 +3203,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)
@@ -3273,7 +3272,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;
-- 
2.11.0




More information about the libvir-list mailing list