|
|
a1c947 |
From 02ebd15a48da7a53560bbea5e530a5b9c929daee Mon Sep 17 00:00:00 2001
|
|
|
a1c947 |
Message-Id: <02ebd15a48da7a53560bbea5e530a5b9c929daee@dist-git>
|
|
|
a1c947 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
a1c947 |
Date: Thu, 7 Jul 2022 17:44:32 +0200
|
|
|
a1c947 |
Subject: [PATCH] virsh: Implement --config for iothreadset
|
|
|
a1c947 |
MIME-Version: 1.0
|
|
|
a1c947 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a1c947 |
Content-Transfer-Encoding: 8bit
|
|
|
a1c947 |
|
|
|
a1c947 |
Our man page already documents that iothreadset has --config
|
|
|
a1c947 |
argument. Well, it doesn't really. Normally, I'd just fix the man
|
|
|
a1c947 |
page, but with recent work on the API it's possible to tweak
|
|
|
a1c947 |
values for inactive XML too. Therefore, implement the --config
|
|
|
a1c947 |
argument for the command.
|
|
|
a1c947 |
|
|
|
a1c947 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
a1c947 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a1c947 |
(cherry picked from commit 3ff558c1c171f66da84b10c81937c1a6895ec6fb)
|
|
|
a1c947 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2059511
|
|
|
a1c947 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
a1c947 |
---
|
|
|
a1c947 |
tools/virsh-domain.c | 8 ++++++++
|
|
|
a1c947 |
1 file changed, 8 insertions(+)
|
|
|
a1c947 |
|
|
|
a1c947 |
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
|
|
|
a1c947 |
index 43034f2f81..da63cc95ff 100644
|
|
|
a1c947 |
--- a/tools/virsh-domain.c
|
|
|
a1c947 |
+++ b/tools/virsh-domain.c
|
|
|
a1c947 |
@@ -7831,6 +7831,7 @@ static const vshCmdOptDef opts_iothreadset[] = {
|
|
|
a1c947 |
.type = VSH_OT_INT,
|
|
|
a1c947 |
.help = N_("upper boundary for worker thread pool")
|
|
|
a1c947 |
},
|
|
|
a1c947 |
+ VIRSH_COMMON_OPT_DOMAIN_CONFIG,
|
|
|
a1c947 |
VIRSH_COMMON_OPT_DOMAIN_LIVE,
|
|
|
a1c947 |
VIRSH_COMMON_OPT_DOMAIN_CURRENT,
|
|
|
a1c947 |
{.name = NULL}
|
|
|
a1c947 |
@@ -7842,6 +7843,8 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd)
|
|
|
a1c947 |
g_autoptr(virshDomain) dom = NULL;
|
|
|
a1c947 |
int id = 0;
|
|
|
a1c947 |
bool ret = false;
|
|
|
a1c947 |
+ bool current = vshCommandOptBool(cmd, "current");
|
|
|
a1c947 |
+ bool config = vshCommandOptBool(cmd, "config");
|
|
|
a1c947 |
bool live = vshCommandOptBool(cmd, "live");
|
|
|
a1c947 |
unsigned int flags = VIR_DOMAIN_AFFECT_CURRENT;
|
|
|
a1c947 |
virTypedParameterPtr params = NULL;
|
|
|
a1c947 |
@@ -7852,8 +7855,13 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd)
|
|
|
a1c947 |
int thread_val;
|
|
|
a1c947 |
int rc;
|
|
|
a1c947 |
|
|
|
a1c947 |
+ VSH_EXCLUSIVE_OPTIONS_VAR(current, live);
|
|
|
a1c947 |
+ VSH_EXCLUSIVE_OPTIONS_VAR(current, config);
|
|
|
a1c947 |
+
|
|
|
a1c947 |
if (live)
|
|
|
a1c947 |
flags |= VIR_DOMAIN_AFFECT_LIVE;
|
|
|
a1c947 |
+ if (config)
|
|
|
a1c947 |
+ flags |= VIR_DOMAIN_AFFECT_CONFIG;
|
|
|
a1c947 |
|
|
|
a1c947 |
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
|
|
a1c947 |
return false;
|
|
|
a1c947 |
--
|
|
|
a1c947 |
2.35.1
|
|
|
a1c947 |
|