mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Make minimum file space percent a constant (#1484)
This commit is contained in:
parent
6988ed9257
commit
a5959789d5
5
posix.go
5
posix.go
@ -34,6 +34,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
fsListLimit = 1000
|
fsListLimit = 1000
|
||||||
|
fsMinSpacePercent = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
// listParams - list object params used for list object map
|
// listParams - list object params used for list object map
|
||||||
@ -98,13 +99,13 @@ func newPosix(diskPath string) (StorageAPI, error) {
|
|||||||
}
|
}
|
||||||
fs := fsStorage{
|
fs := fsStorage{
|
||||||
diskPath: diskPath,
|
diskPath: diskPath,
|
||||||
minFreeDisk: 5, // Minimum 5% disk should be free.
|
minFreeDisk: fsMinSpacePercent, // Minimum 5% disk should be free.
|
||||||
listObjectMap: make(map[listParams][]*treeWalker),
|
listObjectMap: make(map[listParams][]*treeWalker),
|
||||||
listObjectMapMutex: &sync.Mutex{},
|
listObjectMapMutex: &sync.Mutex{},
|
||||||
}
|
}
|
||||||
log.WithFields(logrus.Fields{
|
log.WithFields(logrus.Fields{
|
||||||
"diskPath": diskPath,
|
"diskPath": diskPath,
|
||||||
"minFreeDisk": 5,
|
"minFreeDisk": fsMinSpacePercent,
|
||||||
}).Debugf("Successfully configured FS storage API.")
|
}).Debugf("Successfully configured FS storage API.")
|
||||||
return fs, nil
|
return fs, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user