[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 5/8] hmp: support "without_bql"
From: |
Peter Xu |
Subject: |
[Qemu-devel] [RFC v2 5/8] hmp: support "without_bql" |
Date: |
Wed, 23 Aug 2017 14:51:08 +0800 |
Introducing new option "without_bql" for HMP commands. It works just
like QMP "without-bql", but for HMP commands.
Signed-off-by: Peter Xu <address@hidden>
---
monitor.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/monitor.c b/monitor.c
index 3d4ecff..c26c797 100644
--- a/monitor.c
+++ b/monitor.c
@@ -125,6 +125,8 @@ typedef struct mon_cmd_t {
const char *args_type;
const char *params;
const char *help;
+ /* Whether this command can be run without taking BQL? */
+ bool without_bql;
void (*cmd)(Monitor *mon, const QDict *qdict);
/* @sub_table is a list of 2nd level of commands. If it does not exist,
* cmd should be used. If it exists, sub_table[?].cmd should be
@@ -3154,6 +3156,14 @@ static void handle_hmp_command(Monitor *mon, const char
*cmdline)
return;
}
+ if (cmd->without_bql) {
+ /*
+ * This is similar to QMP's "without-bql". See comments in
+ * do_qmp_dispatch().
+ */
+ take_bql = false;
+ }
+
if (take_bql) {
qemu_mutex_lock_iothread();
}
--
2.7.4
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, (continued)
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Marc-André Lureau, 2017/08/25
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Dr. David Alan Gilbert, 2017/08/25
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Marc-André Lureau, 2017/08/25
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Dr. David Alan Gilbert, 2017/08/25
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Marc-André Lureau, 2017/08/26
- Re: [Qemu-devel] [RFC v2 2/8] monitor: allow monitor to create thread to poll, Peter Xu, 2017/08/27
[Qemu-devel] [RFC v2 3/8] char-io: fix possible risk on IOWatchPoll, Peter Xu, 2017/08/23
[Qemu-devel] [RFC v2 5/8] hmp: support "without_bql",
Peter Xu <=
[Qemu-devel] [RFC v2 4/8] QAPI: new QMP command option "without-bql", Peter Xu, 2017/08/23
Re: [Qemu-devel] [RFC v2 4/8] QAPI: new QMP command option "without-bql", Peter Xu, 2017/08/25
Re: [Qemu-devel] [RFC v2 4/8] QAPI: new QMP command option "without-bql", Dr. David Alan Gilbert, 2017/08/25