vfs: with --vfs-used-is-size value is calculated and then thrown away - fixes #8220

This commit is contained in:
Ilias Ozgur Can Leonard 2024-12-02 16:00:11 +01:00 committed by Nick Craig-Wood
parent e11e679e90
commit 2446c4928d

View file

@ -626,6 +626,10 @@ func (vfs *VFS) Statfs() (total, used, free int64) {
return nil
})
vfs.usage.Used = &usedBySizeAlgorithm
// if we read a Total size then we should calculate Free from it
if vfs.usage.Total != nil {
vfs.usage.Free = nil
}
}
vfs.usageTime = time.Now()
if err != nil {