Re: [Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-30 Thread Eric Blake
On 05/30/2018 01:55 AM, Chen Hanxiao wrote: +usage = u100 / nonroot_total + (u100 % nonroot_total != 0); Why integral instead of floating point? I followed the style of df from coreutils. As the percentage already multiplied by 100, I think it has enough precision. You're making an arb

Re: [Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-30 Thread Chen Hanxiao
At 2018-05-30 11:19:27, "Eric Blake" wrote: >On 05/29/2018 10:01 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> This patch adds support for getting the usage of mounted >> filesystem. >> It's very useful when we try to monitor guest's filesystem. >> Use df of coreutils for reference. >>

Re: [Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-29 Thread Eric Blake
On 05/29/2018 10:19 PM, Eric Blake wrote: @@ -846,13 +846,14 @@   # @name: disk name   # @mountpoint: mount point path   # @type: file system type string +# @usage: file system usage Needs more details.  As written, it is an integer between 0 and 100; but if you use floating point, a better d

Re: [Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-29 Thread Eric Blake
On 05/29/2018 10:01 PM, Chen Hanxiao wrote: From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Use df of coreutils for reference. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- @@ -1072,6 +1

[Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-29 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Use df of coreutils for reference. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- qga/commands-posix.c | 17 + qga/qapi-schema.