[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option
From: |
Max Reitz |
Subject: |
Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option |
Date: |
Wed, 6 Nov 2019 15:32:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 17.10.19 15:02, Kevin Wolf wrote:
> This adds and parses the --monitor option, so that a QMP monitor can be
> used in the storage daemon. The monitor offers commands defined in the
> QAPI schema at storage-daemon/qapi/qapi-schema.json.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> storage-daemon/qapi/qapi-schema.json | 15 ++++++++++++
> qemu-storage-daemon.c | 34 ++++++++++++++++++++++++++++
> Makefile | 30 ++++++++++++++++++++++++
> Makefile.objs | 4 ++--
> monitor/Makefile.objs | 2 ++
> qapi/Makefile.objs | 5 ++++
> qom/Makefile.objs | 1 +
> scripts/qapi/gen.py | 5 ++++
> storage-daemon/Makefile.objs | 1 +
> storage-daemon/qapi/Makefile.objs | 1 +
> 10 files changed, 96 insertions(+), 2 deletions(-)
> create mode 100644 storage-daemon/qapi/qapi-schema.json
> create mode 100644 storage-daemon/Makefile.objs
> create mode 100644 storage-daemon/qapi/Makefile.objs
[...]
> diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
> index 3e04e299ed..03d256f0a4 100644
> --- a/qapi/Makefile.objs
> +++ b/qapi/Makefile.objs
> @@ -30,3 +30,8 @@ obj-y += $(QAPI_TARGET_MODULES:%=qapi-events-%.o)
> obj-y += qapi-events.o
> obj-y += $(QAPI_TARGET_MODULES:%=qapi-commands-%.o)
> obj-y += qapi-commands.o
> +
> +QAPI_MODULES_STORAGE_DAEMON = block block-core char common crypto introspect
> +QAPI_MODULES_STORAGE_DAEMON += job monitor qom sockets pragma transaction
I took a look into the rest, and I wonder whether query-iothreads from
misc.json would be useful, too.
> diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
> index 796c17c38a..c25634f673 100644
> --- a/scripts/qapi/gen.py
> +++ b/scripts/qapi/gen.py
> @@ -44,6 +44,11 @@ class QAPIGen(object):
> return ''
>
> def write(self, output_dir):
> + # Include paths starting with ../ are used to reuse modules of the
> main
> + # schema in specialised schemas. Don't overwrite the files that are
> + # already generated for the main schema.
> + if self.fname.startswith('../'):
> + return
Sorry, but I’m about to ask a clueless question: How do we ensure that
the main schema is generated before something else could make sure of
the specialized schemas?
Max
> pathname = os.path.join(output_dir, self.fname)
> dir = os.path.dirname(pathname)
> if dir:
signature.asc
Description: OpenPGP digital signature
- Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option,
Max Reitz <=