Kevin,

Thanks for the information.  A couple of points for feedback:

1) there doesn't appear to be a way to run qmp query-schema without
spawning a qemu instance in -qmp mode and having a second client issue
the query-schema;  certainly a qemu-system-$arch -qmp-schema would be
quite useful when examining feature availability.   While I know the
QMP/QAPI introspection is where most of the work has gone to describing
how to interact with qemu it's quite cumbersome at best:

searching for blockdev-add, find arg-type: 48, read arg-type-48, find
list of 'variants', know that locking feature is part of 'file', find
type: 207, see member 'locking' in list[A], which is of type 296, find
type: 296, which is an enum of 'on', 'off', 'auto'

A. Interesting enough, qapi says the default is None, however qemu
certainly locks files by default which would seem to imply a mismatch
between qapi defaults and qemu behavior.

That's pretty heavy;  Maybe that warning message qemu prints could
provide some hints as to what a user could do (or refer to a manpage on
locking?).

2) share-rw appears to be a blockdev parameter (I see it available via
most block devices via qemu-system-$arch -device {scsi-hd,ide-hd,virtio-
blk}? However there is no equivalent -blockdev for dumping the default
options that a -blockdev parameter takes.  The qmp-schema also does not
include any information about 'share-rw' w.r.t what values are available
that I could find after dumping the schema.

Thanks smoser:

#!/bin/sh
qemu-system-x86_64 -S -nodefaults -nographic \
   -serial none -monitor none -qmp stdio <<EOF |
{ "execute": "qmp_capabilities" }
{ "execute": "query-qmp-schema" }
{ "execute": "quit" }
EOF
   python3 -c '
import json, sys
data = json.loads(sys.stdin.read().splitlines()[2])
print(json.dumps(data, indent=1, sort_keys=True,
                 separators=(",", ": ")))'

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1716028

Title:
  qemu 2.10 locks images with no feature flag

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1716028/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to