[libvirt] [PATCH 00/23] Add block write threshold event

Peter Krempa pkrempa at redhat.com
Wed Mar 15 16:37:12 UTC 2017


This is another version of the stuff that I've posted here:
https://www.redhat.com/archives/libvir-list/2017-February/msg01391.html
which was partially based on the very old discussion at
https://www.redhat.com/archives/libvir-list/2015-May/msg00580.html

This version fixes some of the review feedback that I've got and also fixes all
the issues pointed out in the original cover letter since I managed to implement
the node name detection in a way suitable for this.

The event is useful for mgmt apps using thin-provisioned storage so that they
don't have to poll for the disk filling all the time.

Peter Krempa (23):
  qemu: driver: Don't call qemuDomainDetermineDiskChain on block jobs
  util: buffer: Add API to set indentation level to a given value
  util: storage: Split out useful bits of virStorageFileParseChainIndex
  util: storage: Add variables for node names into virStorageSource
  lib: Introduce event for tracking disk backing file write threshold
  qemu: monitor: Add support for BLOCK_WRITE_THRESHOLD event
  qemu: domain: Add helper to lookup disk by node name
  qemu: domain: Add helper to generate indexed backing store names
  qemu: process: Wire up firing of the
    VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event
  lib: Add API for setting the threshold size for
    VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD
  virsh: Implement 'domblkthreshold' command to call
    virDomainSetBlockThreshold
  qemu: domain: Add helper to look up disk soruce by the backing store
    string
  qemu: implement qemuDomainSetBlockThreshold
  qemu: capabilities: add capability for query-named-block-nodes qmp cmd
  qemu: monitor: Add monitor infrastructure for query-named-block-nodes
  qemu: block: Add code to allow detection of auto-allocated node names
  tests: qemumonitorjson: Add test case for node name detection code
  tests: qemumonitorjson: Add long backing chain test case for node name
    detection
  tests: qemumonitorjson: Add case for two disks sharing a backing image
  tests: qemumonitorjson: Add relative image names for node name
    detection
  tests: qemumonitorjson: Test node name detection on networked storage
  qemu: monitor: Extract the top level format node when querying disks
  qemu: block: Add code to detect node names when necessary

 daemon/remote.c                                    |   45 +
 examples/object-events/event-test.c                |   19 +
 include/libvirt/libvirt-domain.h                   |   36 +
 src/Makefile.am                                    |    1 +
 src/conf/domain_event.c                            |   97 +
 src/conf/domain_event.h                            |   15 +
 src/driver-hypervisor.h                            |    8 +
 src/libvirt-domain.c                               |   51 +
 src/libvirt_private.syms                           |    5 +
 src/libvirt_public.syms                            |    1 +
 src/qemu/qemu_block.c                              |  378 ++++
 src/qemu/qemu_block.h                              |   51 +
 src/qemu/qemu_blockjob.c                           |    2 +
 src/qemu/qemu_capabilities.c                       |    4 +
 src/qemu/qemu_capabilities.h                       |    2 +
 src/qemu/qemu_domain.c                             |  102 +
 src/qemu/qemu_domain.h                             |   14 +
 src/qemu/qemu_driver.c                             |   80 +-
 src/qemu/qemu_monitor.c                            |   54 +-
 src/qemu/qemu_monitor.h                            |   20 +
 src/qemu/qemu_monitor_json.c                       |   91 +-
 src/qemu/qemu_monitor_json.h                       |    9 +
 src/qemu/qemu_process.c                            |   44 +
 src/remote/remote_driver.c                         |   34 +
 src/remote/remote_protocol.x                       |   33 +-
 src/remote_protocol-structs                        |   16 +
 src/util/virbuffer.c                               |   19 +
 src/util/virbuffer.h                               |    2 +
 src/util/virstoragefile.c                          |  108 +-
 src/util/virstoragefile.h                          |   15 +
 tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml   |    1 +
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |    2 +
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |    2 +
 .../caps_2.6.0-gicv2.aarch64.xml                   |    2 +
 .../caps_2.6.0-gicv3.aarch64.xml                   |    2 +
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |    2 +
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |    2 +
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml    |    2 +
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml   |    2 +
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |    2 +
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |    2 +
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |    2 +
 .../qemumonitorjson-nodename-1.json                |  268 +++
 .../qemumonitorjson-nodename-1.result              |   15 +
 .../qemumonitorjson-nodename-2.json                | 2270 ++++++++++++++++++++
 .../qemumonitorjson-nodename-2.result              |   60 +
 .../qemumonitorjson-nodename-gluster.json          |  135 ++
 .../qemumonitorjson-nodename-gluster.result        |   10 +
 .../qemumonitorjson-nodename-relative.json         |  554 +++++
 .../qemumonitorjson-nodename-relative.result       |   31 +
 .../qemumonitorjson-nodename-same-backing.json     |  316 +++
 .../qemumonitorjson-nodename-same-backing.result   |   11 +
 tests/qemumonitorjsontest.c                        |  120 ++
 tools/virsh-domain.c                               |   85 +
 tools/virsh.pod                                    |    8 +
 55 files changed, 5243 insertions(+), 19 deletions(-)
 create mode 100644 src/qemu/qemu_block.c
 create mode 100644 src/qemu/qemu_block.h
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-1.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-1.result
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-2.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-2.result
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result

-- 
2.12.0




More information about the libvir-list mailing list