These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a required value. some of the patches also remove the duplicate code that was present in block and fsdev files.
Pradeep Jagadeesh (4): throttle: factor out duplicate code qmp: Create IOThrottle structure qmp: refactor duplicate code fsdev: QMP interface for throttling Makefile | 3 + blockdev.c | 97 ++------------------------------- fsdev/qemu-fsdev-dummy.c | 10 ++++ fsdev/qemu-fsdev-throttle.c | 118 ++++++++++++++++++++++++++-------------- fsdev/qemu-fsdev-throttle.h | 13 +++++ fsdev/qemu-fsdev.c | 37 +++++++++++++ hmp-commands-info.hx | 19 +++++++ hmp-commands.hx | 19 +++++++ hmp.c | 88 ++++++++++++++++++++++++++++-- hmp.h | 4 ++ include/qemu/throttle-options.h | 7 +++ qapi-schema.json | 3 + qapi/block-core.json | 76 +------------------------- qapi/fsdev.json | 84 ++++++++++++++++++++++++++++ qapi/iothrottle.json | 88 ++++++++++++++++++++++++++++++ qmp.c | 15 +++++ util/Makefile.objs | 1 + util/throttle-options.c | 105 +++++++++++++++++++++++++++++++++++ 18 files changed, 573 insertions(+), 214 deletions(-) create mode 100644 qapi/fsdev.json create mode 100644 qapi/iothrottle.json create mode 100644 util/throttle-options.c v0 -> v1: Addressed comments from Eric Blake, Greg Kurz and Daniel P.Berrange Mainly renaming the functions and removing the redundant code. v1 -> v2: Addressed comments from Eric Blake and Greg Kurz. As per the suggestion I split the patches into smaller patches. Removed some more duplicate code. v2 -> v3: Addresssed comments from Alberto Garcia. Changed the comment from block to iothrottle in the iothrottle.json Added the dummy functions in qemu-fsdev-dummy.c to address the compilation issues that were observed. v3 -> v4: Addressed comments from Eric Blake and Greg Kurz Re-ordered the patches Added the dummy functions in qmp.c to address the cross compilation issues -- 1.8.3.1