On 05/30/2018 04:01 AM, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanx...@gmail.com>
This patch adds support for getting the usage of mounted
filesystem.
It's very useful when we try to monitor guest's filesystem.
Cc: Michael Roth <mdr...@linux.vnet.ibm.com>
Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com>
---
v2:
add description in qapi-schema and version numbers
+# @usage: file system usage, integer between 0 and 100 (since 3.0)
I still find this as being too imprecise. Don't throw away data learned
from the guest that the client might like to know. Either provide a
floating point between 0 and 1, or provide the two actual statvfs()
numbers (used and total) directly and let the client perform the
division to learn the ratio.
# @disk: an array of disk hardware information that the volume lies on,
# which may be empty if the disk type is not supported
#
# Since: 2.2
##
{ 'struct': 'GuestFilesystemInfo',
- 'data': {'name': 'str', 'mountpoint': 'str', 'type': 'str',
+ 'data': {'name': 'str', 'mountpoint': 'str', 'type': 'str', 'usage': 'int',
'disk': ['GuestDiskAddress']} }
##
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org