qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/13] RFC: [for 5.0]: HMP monitor handlers cleanups
@ 2020-01-27 10:36 Maxim Levitsky
  2020-01-27 10:36 ` [PATCH v3 01/13] usb/dev-storage: remove unused include Maxim Levitsky
                   ` (14 more replies)
  0 siblings, 15 replies; 48+ messages in thread
From: Maxim Levitsky @ 2020-01-27 10:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Markus Armbruster, Dr. David Alan Gilbert,
	Max Reitz, Gerd Hoffmann, Maxim Levitsky

This patch series is bunch of cleanups
to the hmp monitor code.

This series only touched blockdev related hmp handlers.

No functional changes expected other that
light error message changes by the last patch.

This was inspired by this bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1719169

Basically some users still parse hmp error messages,
and they would like to have them prefixed with 'Error:'

In commit 66363e9a43f649360a3f74d2805c9f864da027eb we added
the hmp_handle_error which does exactl that but some hmp handlers
don't use it.

In this patch series, I moved all the block related hmp handlers
into blockdev-hmp-cmds.c, and then made them use this function
to report the errors.

I hope I didn't change too much code, I just felt that if
I touch this code, I can also make it easier to find these
handlers, that were scattered over 3 different files.

Changes from V1:
   * move the handlers to block/monitor/block-hmp-cmds.c
   * tiny cleanup for the commit messages

Changes from V2:
   * Moved all the function prototypes to new header (blockdev-hmp-cmds.h)
   * Set the license of blockdev-hmp-cmds.c to GPLv2+
   * Moved hmp_snapshot_* functions to blockdev-hmp-cmds.c
   * Moved hmp_drive_add_node to blockdev-hmp-cmds.c
     (this change needed some new exports, thus in separate new patch)
   * Moved hmp_qemu_io and hmp_eject to blockdev-hmp-cmds.c
   * Added 'error:' prefix to vreport, and updated the iotests
     This is invasive change, but really feels like the right one
   * Added minor refactoring patch that drops an unused #include

Best regards,
	Maxim Levitsky

Maxim Levitsky (13):
  usb/dev-storage: remove unused include
  monitor/hmp: uninline add_init_drive
  monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c
  monitor/hmp: move hmp_drive_del and hmp_commit to block-hmp-cmds.c
  monitor/hmp: move hmp_drive_mirror and hmp_drive_backup to
    block-hmp-cmds.c
  monitor/hmp: move hmp_block_job* to block-hmp-cmds.c
  monitor/hmp: move hmp_snapshot_* to block-hmp-cmds.c
  monitor/hmp: move hmp_nbd_server* to block-hmp-cmds.c
  monitor/hmp: move remaining hmp_block* functions to block-hmp-cmds.c
  monitor/hmp: move hmp_info_block* to block-hmp-cmds.c
  monitor: Move hmp_drive_add_node to block-hmp-cmds.c
  add 'error' prefix to vreport
  monitor/hmp: Prefer to use hmp_handle_error for error reporting in
    block hmp commands

 MAINTAINERS                        |   1 +
 Makefile.objs                      |   2 +-
 block/Makefile.objs                |   1 +
 block/monitor/Makefile.objs        |   1 +
 block/monitor/block-hmp-cmds.c     | 980 +++++++++++++++++++++++++++++
 blockdev.c                         | 137 +---
 device-hotplug.c                   |  91 ---
 hw/usb/dev-storage.c               |   1 -
 include/block/block-hmp-commands.h |  42 ++
 include/block/block_int.h          |   5 +-
 include/monitor/hmp.h              |  24 -
 include/sysemu/blockdev.h          |   4 -
 include/sysemu/sysemu.h            |   3 -
 monitor/hmp-cmds.c                 | 771 +----------------------
 monitor/misc.c                     |   1 +
 tests/qemu-iotests/020.out         |   2 +-
 tests/qemu-iotests/026.out         | 260 ++++----
 tests/qemu-iotests/036.out         |  16 +-
 tests/qemu-iotests/043.out         |   6 +-
 tests/qemu-iotests/049.out         |  30 +-
 tests/qemu-iotests/051.pc.out      | 150 ++---
 tests/qemu-iotests/054.out         |   4 +-
 tests/qemu-iotests/060.out         |  20 +-
 tests/qemu-iotests/061.out         |  26 +-
 tests/qemu-iotests/069.out         |   2 +-
 tests/qemu-iotests/071.out         |   4 +-
 tests/qemu-iotests/074.out         |   4 +-
 tests/qemu-iotests/079.out         |   2 +-
 tests/qemu-iotests/080.out         |  72 +--
 tests/qemu-iotests/081.out         |   2 +-
 tests/qemu-iotests/082.out         |  38 +-
 tests/qemu-iotests/083.out         |  68 +-
 tests/qemu-iotests/098.out         |   8 +-
 tests/qemu-iotests/103.out         |  14 +-
 tests/qemu-iotests/106.out         |   4 +-
 tests/qemu-iotests/111.out         |   2 +-
 tests/qemu-iotests/112.out         |  24 +-
 tests/qemu-iotests/113.out         |   6 +-
 tests/qemu-iotests/114.out         |   2 +-
 tests/qemu-iotests/122.out         |   4 +-
 tests/qemu-iotests/133.out         |  30 +-
 tests/qemu-iotests/137.out         |  28 +-
 tests/qemu-iotests/140.out         |   2 +-
 tests/qemu-iotests/142.out         |  38 +-
 tests/qemu-iotests/143.out         |   2 +-
 tests/qemu-iotests/153.out         | 118 ++--
 tests/qemu-iotests/162.out         |  10 +-
 tests/qemu-iotests/172.out         |  16 +-
 tests/qemu-iotests/178.out.qcow2   |  30 +-
 tests/qemu-iotests/178.out.raw     |  26 +-
 tests/qemu-iotests/182.out         |   2 +-
 tests/qemu-iotests/187.out         |   6 +-
 tests/qemu-iotests/188.out         |   2 +-
 tests/qemu-iotests/197.out         |   2 +-
 tests/qemu-iotests/205             |   2 +-
 tests/qemu-iotests/215.out         |   2 +-
 tests/qemu-iotests/217.out         |   2 +-
 tests/qemu-iotests/226.out         |  12 +-
 tests/qemu-iotests/232.out         |  12 +-
 tests/qemu-iotests/233.out         |  24 +-
 tests/qemu-iotests/242.out         |   2 +-
 tests/qemu-iotests/244.out         |  14 +-
 tests/qemu-iotests/249.out         |   6 +-
 tests/qemu-iotests/261.out         |  24 +-
 tests/qemu-iotests/267.out         |  16 +-
 tests/qemu-iotests/common.filter   |   2 +-
 util/qemu-error.c                  |   1 +
 67 files changed, 1640 insertions(+), 1625 deletions(-)
 create mode 100644 block/monitor/Makefile.objs
 create mode 100644 block/monitor/block-hmp-cmds.c
 delete mode 100644 device-hotplug.c
 create mode 100644 include/block/block-hmp-commands.h

-- 
2.17.2



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

end of thread, other threads:[~2020-02-06  9:37 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 10:36 [PATCH v3 00/13] RFC: [for 5.0]: HMP monitor handlers cleanups Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 01/13] usb/dev-storage: remove unused include Maxim Levitsky
2020-01-27 10:49   ` Philippe Mathieu-Daudé
2020-01-27 10:36 ` [PATCH v3 02/13] monitor/hmp: uninline add_init_drive Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 03/13] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c Maxim Levitsky
2020-01-28 16:56   ` Dr. David Alan Gilbert
2020-01-28 19:28     ` Maxim Levitsky
2020-01-29 10:19       ` Markus Armbruster
2020-01-29 11:31         ` Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 04/13] monitor/hmp: move hmp_drive_del and hmp_commit to block-hmp-cmds.c Maxim Levitsky
2020-01-28 17:51   ` Dr. David Alan Gilbert
2020-01-28 19:29     ` Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 05/13] monitor/hmp: move hmp_drive_mirror and hmp_drive_backup " Maxim Levitsky
2020-01-28 17:59   ` Dr. David Alan Gilbert
2020-01-27 10:36 ` [PATCH v3 06/13] monitor/hmp: move hmp_block_job* " Maxim Levitsky
2020-01-28 18:11   ` Dr. David Alan Gilbert
2020-01-28 18:15   ` Dr. David Alan Gilbert
2020-01-27 10:36 ` [PATCH v3 07/13] monitor/hmp: move hmp_snapshot_* " Maxim Levitsky
2020-01-28 18:53   ` Dr. David Alan Gilbert
2020-01-27 10:36 ` [PATCH v3 08/13] monitor/hmp: move hmp_nbd_server* " Maxim Levitsky
2020-01-28 18:56   ` Dr. David Alan Gilbert
2020-01-28 20:05     ` Eric Blake
2020-01-27 10:36 ` [PATCH v3 09/13] monitor/hmp: move remaining hmp_block* functions " Maxim Levitsky
2020-01-28 18:45   ` Dr. David Alan Gilbert
2020-01-28 18:51   ` Dr. David Alan Gilbert
2020-01-27 10:36 ` [PATCH v3 10/13] monitor/hmp: move hmp_info_block* " Maxim Levitsky
2020-01-28 19:00   ` Dr. David Alan Gilbert
2020-01-27 10:36 ` [PATCH v3 11/13] monitor: Move hmp_drive_add_node " Maxim Levitsky
2020-01-28 19:03   ` Dr. David Alan Gilbert
2020-01-28 19:30     ` Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 12/13] add 'error' prefix to vreport Maxim Levitsky
2020-01-28 19:30   ` Maxim Levitsky
2020-01-29 10:38     ` Markus Armbruster
2020-01-29 10:58       ` Maxim Levitsky
2020-01-27 10:36 ` [PATCH v3 13/13] monitor/hmp: Prefer to use hmp_handle_error for error reporting in block hmp commands Maxim Levitsky
2020-01-28 19:31   ` Maxim Levitsky
2020-01-29 10:27     ` Markus Armbruster
2020-01-29 11:05       ` Maxim Levitsky
2020-01-27 10:55 ` [PATCH v3 00/13] RFC: [for 5.0]: HMP monitor handlers cleanups no-reply
2020-01-27 10:59   ` Maxim Levitsky
2020-01-27 19:39 ` John Snow
2020-01-27 20:43   ` Peter Krempa
2020-01-27 21:01     ` John Snow
2020-01-28  9:13       ` Ján Tomko
2020-01-28 16:47       ` Dr. David Alan Gilbert
2020-02-05 23:25         ` John Snow
2020-02-06  9:35           ` Dr. David Alan Gilbert
2020-01-28  8:17     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).