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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux