[pbs-devel] [PATCH proxmox v2 2/3] proxmox-sys: add DiskUsage struct and helper

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Dec 16 09:20:12 CET 2021


On 16.12.21 09:15, Dominik Csapak wrote:
> On 12/15/21 13:41, Thomas Lamprecht wrote:
>> On 15.12.21 10:19, Dominik Csapak wrote:
>>> @@ -102,3 +103,28 @@ impl CreateOptions {
>>>       */
>>>   }
>>>   +/// Basic disk usage information
>>
>> would add the source, e.g.: ... derived from what statfs64 reports
>>
>>> +#[derive(Serialize)]
>>> +pub struct DiskUsage {
>>
>> Is DiskUsage really a good name here? As with "Disk" I thing block level, but
>> this is filesystem level.. Maybe FileSystemUsage (shorteting to FSUsage could
>> be done, but that's not helping that much..
> 
> how about FileSystemInformation (or FSInfo if the length is a problem)? IMHO "usage" is wrong if we include things like the type or id

not really wrong to include an ID to any info for tracking purpose, I mean the
syscall also returns that and is named "StatFS", so that's fine, its wrong to
name it disk, but using "info" or "usage" won't create any big confusion either
way IMO, no hard feelings there.






More information about the pbs-devel mailing list