[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 1/2] qga: add mountpoint usage to GuestFilesy
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v5 1/2] qga: add mountpoint usage to GuestFilesystemInfo |
Date: |
Fri, 1 Jun 2018 10:47:04 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/01/2018 10:27 AM, Chen Hanxiao wrote:
From: Chen Hanxiao <address@hidden>
This patch adds support for getting the usage of mounted
filesystem.
The usage of fs stored as used_bytes and total_bytes.
It's very useful when we try to monitor guest's filesystem.
Cc: Michael Roth <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Daniel P. Berrangé <address@hidden>
Signed-off-by: Chen Hanxiao <address@hidden>
+++ b/qga/qapi-schema.json
@@ -840,12 +840,24 @@
'bus-type': 'GuestDiskBusType',
'bus': 'int', 'target': 'int', 'unit': 'int'} }
+##
+# @GuestFsUsage:
+#
+# @used-bytes: file system used bytes
+# @total-bytes: file system total bytes for nonroot user
+#
+# Since: 3.0
+##
+{ 'struct': 'GuestFsUsage',
+ 'data': {'used-bytes': 'uint64', 'total-bytes': 'uint64'} }
That seems like pointless nesting on the wire, unless we have plans of
reusing this type in other API calls. Is it any easier...
+
##
# @GuestFilesystemInfo:
#
# @name: disk name
# @mountpoint: mount point path
# @type: file system type string
+# @usage: file system usage struct (since 3.0)
# @disk: an array of disk hardware information that the volume lies on,
# which may be empty if the disk type is not supported
#
@@ -853,7 +865,7 @@
##
{ 'struct': 'GuestFilesystemInfo',
'data': {'name': 'str', 'mountpoint': 'str', 'type': 'str',
- 'disk': ['GuestDiskAddress']} }
+ '*usage': 'GuestFsUsage', 'disk': ['GuestDiskAddress']} }
...to just inline '*used-bytes' and '*total-bytes' here?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org