render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
fbe740
From 26d83d4f99fbdebf9546ebb883535a85dda2fbad Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <26d83d4f99fbdebf9546ebb883535a85dda2fbad@dist-git>
fbe740
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
fbe740
Date: Wed, 4 Mar 2020 12:42:43 +0100
fbe740
Subject: [PATCH] qemu: add virtiofsd_debug to qemu.conf
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Add a 'virtiofsd_debug' option for tuning whether to run virtiofsd
fbe740
in debug mode.
fbe740
fbe740
Signed-off-by: Ján Tomko <jtomko@redhat.com>
fbe740
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
fbe740
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Tested-by: Andrea Bolognani <abologna@redhat.com>
fbe740
(cherry picked from commit f04319a5449974f1553458e96c2a6ee25e65ab93)
fbe740
Signed-off-by: Ján Tomko <jtomko@redhat.com>
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
fbe740
Message-Id: <6e46af8184e9e982a6aca92a62534623795bb1fc.1583322091.git.jtomko@redhat.com>
fbe740
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
fbe740
---
fbe740
 src/qemu/libvirtd_qemu.aug         | 1 +
fbe740
 src/qemu/qemu.conf                 | 7 +++++++
fbe740
 src/qemu/qemu_conf.c               | 2 ++
fbe740
 src/qemu/qemu_conf.h               | 1 +
fbe740
 src/qemu/test_libvirtd_qemu.aug.in | 1 +
fbe740
 5 files changed, 12 insertions(+)
fbe740
fbe740
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
fbe740
index 557b6f38f8..3014fa6b86 100644
fbe740
--- a/src/qemu/libvirtd_qemu.aug
fbe740
+++ b/src/qemu/libvirtd_qemu.aug
fbe740
@@ -116,6 +116,7 @@ module Libvirtd_qemu =
fbe740
    let nvram_entry = str_array_entry "nvram"
fbe740
 
fbe740
    let debug_level_entry = int_entry "gluster_debug_level"
fbe740
+                 | bool_entry "virtiofsd_debug"
fbe740
 
fbe740
    let memory_entry = str_entry "memory_backing_dir"
fbe740
 
fbe740
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
fbe740
index b6805ffc41..815d2d78ae 100644
fbe740
--- a/src/qemu/qemu.conf
fbe740
+++ b/src/qemu/qemu.conf
fbe740
@@ -809,6 +809,13 @@
fbe740
 #
fbe740
 #gluster_debug_level = 9
fbe740
 
fbe740
+# virtiofsd debug
fbe740
+#
fbe740
+# Whether to enable the debugging output of the virtiofsd daemon.
fbe740
+# Possible values are 0 or 1. Disabled by default.
fbe740
+#
fbe740
+#virtiofsd_debug = 1
fbe740
+
fbe740
 # To enhance security, QEMU driver is capable of creating private namespaces
fbe740
 # for each domain started. Well, so far only "mount" namespace is supported. If
fbe740
 # enabled it means qemu process is unable to see all the devices on the system,
fbe740
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
fbe740
index 029996427e..7aaf2862a4 100644
fbe740
--- a/src/qemu/qemu_conf.c
fbe740
+++ b/src/qemu/qemu_conf.c
fbe740
@@ -801,6 +801,8 @@ virQEMUDriverConfigLoadDebugEntry(virQEMUDriverConfigPtr cfg,
fbe740
 {
fbe740
     if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
fbe740
         return -1;
fbe740
+    if (virConfGetValueBool(conf, "virtiofsd_debug", &cfg->virtiofsdDebug) < 0)
fbe740
+        return -1;
fbe740
 
fbe740
     return 0;
fbe740
 }
fbe740
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
fbe740
index b9401635d7..4361f5b2bb 100644
fbe740
--- a/src/qemu/qemu_conf.h
fbe740
+++ b/src/qemu/qemu_conf.h
fbe740
@@ -202,6 +202,7 @@ struct _virQEMUDriverConfig {
fbe740
     virFirmwarePtr *firmwares;
fbe740
     size_t nfirmwares;
fbe740
     unsigned int glusterDebugLevel;
fbe740
+    bool virtiofsdDebug;
fbe740
 
fbe740
     char *memoryBackingDir;
fbe740
 
fbe740
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
fbe740
index dd90edf687..fca9a942c9 100644
fbe740
--- a/src/qemu/test_libvirtd_qemu.aug.in
fbe740
+++ b/src/qemu/test_libvirtd_qemu.aug.in
fbe740
@@ -98,6 +98,7 @@ module Test_libvirtd_qemu =
fbe740
 }
fbe740
 { "stdio_handler" = "logd" }
fbe740
 { "gluster_debug_level" = "9" }
fbe740
+{ "virtiofsd_debug" = "1" }
fbe740
 { "namespaces"
fbe740
     { "1" = "mount" }
fbe740
 }
fbe740
-- 
fbe740
2.25.1
fbe740