All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] qemu-img: Improve option help for amend
@ 2018-04-21 16:54 Max Reitz
  2018-04-21 16:54 ` [Qemu-devel] [PATCH 1/7] qemu-img: Amendment support implies create_opts Max Reitz
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Max Reitz @ 2018-04-21 16:54 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf

Currently, "qemu-img amend -f $format -o help" prints many things which
it claims to be supported, but most of the time it's wrong.  Usually
that starts with the format already: No format but qcow2 supports option
amendment, so we should never claim that a format supports any options
when it actually does not support amendment in the first place.

It goes on with the options themselves.  The qcow2 driver does not
support amendment of all creation options, so we should not claim it
does.  Actually knowing which formats are supported exactly would be a
bit difficult (this would probably involve adding a field to
QemuOptDesc, and I don't really want to do that), but what we can do
instead is to at least advise the user that the options we print are all
of the creation options and that we might not support amending all of
them.

There is a Bugzilla for this here:
https://bugzilla.redhat.com/show_bug.cgi?id=1537956

On the way to address these issues, there is more to be done, though.
bdrv_amend_options() does not have an Error parameter yet, and there is
no real excuse for that.

Also, "qemu-img create -o help" has its own little issue with formats
that do not support creation:

    $ qemu-img create -f bochs -o help
    Supported options:
    qemu-img: util/qemu-option.c:219:
    qemu_opts_print_help: Assertion `list' failed.
    [1]    24831 abort (core dumped)  qemu-img create -f bochs -o help

Let's fix that, too.


Max Reitz (7):
  qemu-img: Amendment support implies create_opts
  block: Add Error parameter to bdrv_amend_options
  qemu-option: Pull out "Supported options" print
  qemu-img: Add print_amend_option_help()
  qemu-img: Recognize no creation support in -o help
  iotests: Test help option for unsupporting formats
  iotests: Rework 113

 include/block/block.h      |  3 +-
 include/block/block_int.h  |  3 +-
 block.c                    |  8 ++++--
 block/qcow2.c              | 72 ++++++++++++++++++++++++++++++----------------
 qemu-img.c                 | 52 +++++++++++++++++++++++++++++----
 util/qemu-option.c         |  1 -
 tests/qemu-iotests/060.out |  4 +--
 tests/qemu-iotests/061.out |  7 -----
 tests/qemu-iotests/080.out |  4 +--
 tests/qemu-iotests/082     |  9 ++++++
 tests/qemu-iotests/082.out | 53 +++++++++++++++++++++++-----------
 tests/qemu-iotests/112.out |  3 --
 tests/qemu-iotests/113     | 19 ++++++------
 tests/qemu-iotests/113.out |  7 +++--
 14 files changed, 166 insertions(+), 79 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-05-02 18:49 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-21 16:54 [Qemu-devel] [PATCH 0/7] qemu-img: Improve option help for amend Max Reitz
2018-04-21 16:54 ` [Qemu-devel] [PATCH 1/7] qemu-img: Amendment support implies create_opts Max Reitz
2018-05-02 17:35   ` Eric Blake
2018-04-21 16:54 ` [Qemu-devel] [PATCH 2/7] block: Add Error parameter to bdrv_amend_options Max Reitz
2018-05-01 22:49   ` [Qemu-devel] [Qemu-block] " John Snow
2018-05-02 17:52   ` [Qemu-devel] " Eric Blake
2018-05-02 18:08     ` Max Reitz
2018-04-21 16:54 ` [Qemu-devel] [PATCH 3/7] qemu-option: Pull out "Supported options" print Max Reitz
2018-05-02 18:09   ` Eric Blake
2018-04-21 16:54 ` [Qemu-devel] [PATCH 4/7] qemu-img: Add print_amend_option_help() Max Reitz
2018-05-02 18:13   ` Eric Blake
2018-04-21 16:54 ` [Qemu-devel] [PATCH 5/7] qemu-img: Recognize no creation support in -o help Max Reitz
2018-05-02 17:40   ` [Qemu-devel] [Qemu-block] " John Snow
2018-05-02 18:15   ` [Qemu-devel] " Eric Blake
2018-04-21 16:54 ` [Qemu-devel] [PATCH 6/7] iotests: Test help option for unsupporting formats Max Reitz
2018-05-02 18:00   ` [Qemu-devel] [Qemu-block] " John Snow
2018-05-02 18:17   ` [Qemu-devel] " Eric Blake
2018-04-21 16:54 ` [Qemu-devel] [PATCH 7/7] iotests: Rework 113 Max Reitz
2018-05-02 18:03   ` [Qemu-devel] [Qemu-block] " John Snow
2018-05-02 18:13     ` Max Reitz
2018-05-02 18:18       ` John Snow
2018-05-02 18:48         ` Max Reitz
2018-05-02 18:24   ` [Qemu-devel] " Eric Blake
2018-05-02 18:35     ` Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.