qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-re


From: Peter Krempa
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature
Date: Fri, 29 Mar 2019 12:20:12 +0100
User-agent: Mutt/1.11.3 (2019-02-01)

On Fri, Mar 29, 2019 at 10:57:55 +0100, Markus Armbruster wrote:
> Kevin Wolf <address@hidden> writes:
> 
> > auto-read-only=on changed its behaviour in file-posix for the 4.0
> > release.
> 
> Commit hash, please.
> 
> >          This change cannot be detected through the usual mechanisms
> > like schema introspection. Add a new feature to query-qemu-features to
> > allow libvirt to detect the presence of the new behaviour.
> >
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> >  qapi/misc.json | 7 ++++++-
> >  qmp.c          | 1 +
> >  2 files changed, 7 insertions(+), 1 deletion(-)

[...]

> > diff --git a/qmp.c b/qmp.c
> > index 0aad533eca..2a887c1e7d 100644
> > --- a/qmp.c
> > +++ b/qmp.c
> > @@ -723,6 +723,7 @@ QemuFeatures *qmp_query_qemu_features(Error **errp)
> >      QemuFeatures *caps = g_new(QemuFeatures, 1);
> >  
> >      *caps = (QemuFeatures) {
> > +        .file_posix_dynamic_auto_read_only = true,
> >      };
> >  
> >      return caps;
> 
> Running the command provides no additional information over schema
> introspection.  Kind of contradicts "Information about support for QEMU
> features that isn't available through schema introspection" :)

Honestly I don't care whether it provides information on top of the
schema. There is a long term defficiency which does not allow us to
detect changes in the code as they are invisible to libvirt's means of
capability detection. Then it results in monstrosities like:

https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_capabilities.c;h=56228e7a36e78ad2ff52a5e83d4af144deea9528;hb=HEAD#l4309

Or you get ad-hoc hacks which add a useless command just to have
something exposed in the schema:

commit e1ca8f7e1915496148f6e0ce1f7c2309af013312
Author: Gerd Hoffmann <address@hidden>
Date:   Thu Nov 22 08:16:13 2018 +0100

    qapi: add query-display-options command
    
    Add query-display-options command, which allows querying the qemu
    display configuration.  This isn't particularly useful, except it
    exposes QAPI type DisplayOptions in query-qmp-schema, so that libvirt
    can discover recently added -display parameter rendernode (commit
    d4dc4ab133b).  Works around lack of sufficiently powerful command line
    introspection.

Whether there is a static entry in the QMP schema (which feels wrong
btw as it does not actually expose something which is regarding the
interaction with QMP) or something like this, we need it yesterday. I
don't want to add version checks any more.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]