qemu-devel
[Top][All Lists]
Advanced

[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: Chen Hanxiao
Subject: Re: [Qemu-devel] [PATCH v5 1/2] qga: add mountpoint usage to GuestFilesystemInfo
Date: Sat, 2 Jun 2018 00:58:13 +0800 (CST)


在 2018-06-01 23:47:04,"Eric Blake" <address@hidden> 写道:
>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?
>

I just want to group them together, and use one has_XXX.

I'll make a some fix for this.
Thanks for you advice.

Regards,
- Chen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]