Improve disk usage calculation (#12376)

- for single pool setups usage is not checked.
- for pools, only check the "set" in which it would be placed.
- keep a minimum number of inodes (when we know it).
- ignore for `.minio.sys`.
This commit is contained in:
Klaus Post
2021-06-07 17:13:15 +02:00
committed by GitHub
parent 8a9ff2b331
commit 403f4b9c84
3 changed files with 91 additions and 32 deletions

View File

@@ -107,6 +107,12 @@ const (
// diskFillFraction is the fraction of a disk we allow to be filled.
diskFillFraction = 0.95
// diskAssumeUnknownSize is the size to assume when an unknown size upload is requested.
diskAssumeUnknownSize = 1 << 30
// diskMinInodes is the minimum number of inodes we want free on a disk to perform writes.
diskMinInodes = 1000
)
var globalCLIContext = struct {