剩余空间使用free blocks代替available blocks

This commit is contained in:
刘祥超
2023-07-09 21:27:04 +08:00
parent 1be64adb6a
commit c6c0823d30
4 changed files with 9 additions and 9 deletions

View File

@@ -1418,14 +1418,14 @@ func (this *FileStorage) checkDiskSpace() {
if this.options != nil && len(this.options.Dir) > 0 {
stat, err := fsutils.Stat(this.options.Dir)
if err == nil {
this.mainDiskIsFull = stat.AvailableSize() < MinDiskSpace
this.mainDiskIsFull = stat.FreeSize() < MinDiskSpace
}
}
var subDirs = this.subDirs // copy slice
for _, subDir := range subDirs {
stat, err := fsutils.Stat(subDir.Path)
if err == nil {
subDir.IsFull = stat.AvailableSize() < MinDiskSpace
subDir.IsFull = stat.FreeSize() < MinDiskSpace
}
}
}