Kevin Wolf <kw...@redhat.com> 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 <kw...@redhat.com> > --- > qapi/misc.json | 7 ++++++- > qmp.c | 1 + > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/qapi/misc.json b/qapi/misc.json > index d892f37633..df23c54a65 100644 > --- a/qapi/misc.json > +++ b/qapi/misc.json > @@ -3058,10 +3058,15 @@ > # Information about support for QEMU features that isn't available through > # schema introspection. > # > +# @file-posix-dynamic-auto-read-only: > +# true if auto-read-only=on means that the image file is dynamically > reopened > +# read-only or read-write depending on whether any writers are attached to > +# the node. > +# The name @file-posix-dynamic-auto-read-only suggests the semantic change of auto-read-only=on explained in the doc comment applies only to some BlockDrivers (as a non-variant member of BlockdevOptions, auto-read-only applies to all). Which ones exactly? > # Since: 4.0 > ## > { 'struct': 'QemuFeatures', > - 'data': { } } > + 'data': { 'file-posix-dynamic-auto-read-only': 'bool' } } > > ## > # @query-qemu-features: > 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" :)