mirror_qemu/include
Francesco Romani e2462113b2 block: add event when disk usage exceeds threshold
Managing applications, like oVirt (http://www.ovirt.org), make extensive
use of thin-provisioned disk images.
To let the guest run smoothly and be not unnecessarily paused, oVirt sets
a disk usage threshold (so called 'high water mark') based on the occupation
of the device,  and automatically extends the image once the threshold
is reached or exceeded.

In order to detect the crossing of the threshold, oVirt has no choice but
aggressively polling the QEMU monitor using the query-blockstats command.
This lead to unnecessary system load, and is made even worse under scale:
deployments with hundreds of VMs are no longer rare.

To fix this, this patch adds:
* A new monitor command `block-set-write-threshold', to set a mark for
  a given block device.
* A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
  usage exceeds the threshold.
* A new `write_threshold' field into the `BlockDeviceInfo' structure,
  to report the configured threshold.

This will allow the managing application to use smarter and more
efficient monitoring, greatly reducing the need of polling.

[Updated qemu-iotests 067 output to add the new 'write_threshold'
property. --Stefan]
[Changed g_assert_false() to !g_assert() to fix the build on older glib
versions. --Kevin]

Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1421068273-692-1-git-send-email-fromani@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-02-06 17:24:21 +01:00
..
block block: add event when disk usage exceeds threshold 2015-02-06 17:24:21 +01:00
disas disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
exec cpu_ldst.h: Allow NB_MMU_MODES to be 7 2015-02-05 13:37:23 +00:00
fpu softfloat: Clarify license status 2015-01-29 16:45:45 +00:00
hw virtio-blk: add a knob to disable request merging 2015-02-06 17:24:21 +01:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration migration: Append JSON description of migration stream 2015-02-05 17:16:14 +01:00
monitor block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
net net: remove bootindex property from qdev to qom 2014-10-15 09:52:54 +02:00
qapi balloon: Eliminate silly QERR_ macros 2015-01-29 10:06:02 +01:00
qemu cpu-exec: simplify init_delay_params 2015-02-02 16:55:11 +01:00
qom qom: Add description field in ObjectProperty struct 2014-10-15 05:03:15 +02:00
sysemu block-backend: expose bs->bl.max_transfer_length 2015-02-06 17:24:21 +01:00
ui qmp hmp: Improve error messages when SPICE is not in use 2015-01-29 10:01:31 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h tcg-sparc: Use ADDXC in addsub2_i64 2014-09-29 14:55:27 -04:00
glib-compat.h glib: add compatibility interface for g_strcmp0() 2014-10-16 23:02:31 +01:00
qemu-common.h qemu-common.h: optimise muldiv64 if int128 is available 2015-01-14 10:38:57 +01:00
qemu-io.h qemu-io: Fix warnings from static code analysis 2014-03-13 14:42:24 +01:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00