Make minimum file space percent a constant (#1484)

master
Rajiv Makhijani 9 years ago committed by Harshavardhana
parent 6988ed9257
commit a5959789d5
  1. 5
      posix.go

@ -34,6 +34,7 @@ import (
const (
fsListLimit = 1000
fsMinSpacePercent = 5
)
// listParams - list object params used for list object map
@ -98,13 +99,13 @@ func newPosix(diskPath string) (StorageAPI, error) {
}
fs := fsStorage{
diskPath: diskPath,
minFreeDisk: 5, // Minimum 5% disk should be free.
minFreeDisk: fsMinSpacePercent, // Minimum 5% disk should be free.
listObjectMap: make(map[listParams][]*treeWalker),
listObjectMapMutex: &sync.Mutex{},
}
log.WithFields(logrus.Fields{
"diskPath": diskPath,
"minFreeDisk": 5,
"minFreeDisk": fsMinSpacePercent,
}).Debugf("Successfully configured FS storage API.")
return fs, nil
}

Loading…
Cancel
Save