From a5959789d54cf0fa0fef71c02629944f1402948c Mon Sep 17 00:00:00 2001 From: Rajiv Makhijani Date: Wed, 4 May 2016 15:39:06 -0700 Subject: [PATCH] Make minimum file space percent a constant (#1484) --- posix.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posix.go b/posix.go index cb35c1193..98973bdef 100644 --- a/posix.go +++ b/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 }