On 09/02/2014 06:31 AM, Francesco Romani wrote:
Management software, want to be able to allocate disk space on
demand.
s/software, want/software wants/
To support this, they need keep track of the space occupation
of the block device.
(what's more, during a blockcopy or active blockcommit, they also need
to track space allocation of secondary files - but we can add that
support later)
This information is reported by qemu as part of block stats.
This patch extend the block information in the bulk stats with
s/extend/extends/
the allocation information, in order to save a call to the QEMU
monitor.
---
src/libvirt.c | 1 +
src/qemu/qemu_driver.c | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/src/libvirt.c b/src/libvirt.c
index cabfb91..81d71be 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -21591,6 +21591,7 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* "block.<num>.wr.times" - total time (ns) spent on writes.
* "block.<num>.fl.reqs" - total flush requests
* "block.<num>.fl.times" - total time (ns) spent on cache flushing
+ * "block.<num>.allocation" - offset of the highest written sector.
Missing type.
*
* Using 0 for @stats returns all stats groups supported by the given
* hypervisor.
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 977e8c7..3fb54db 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17554,6 +17554,18 @@ do { \
goto cleanup; \
} while (0)
+#define QEMU_ADD_BLOCK_PARAM_ULL(RECORD, MAXPARAMS, NUM, NAME, VALUE) \
+do { \
+ char param_name[NAME_MAX]; \
Oversized.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org