fs: Add granular locking.

This commit is contained in:
Harshavardhana
2016-02-04 20:40:58 -08:00
parent f2113d35be
commit 8557cbc9b7
9 changed files with 196 additions and 159 deletions

View File

@@ -143,10 +143,9 @@ func getNewWebAPI(conf cloudServerConfig) *WebAPI {
// getNewCloudStorageAPI instantiate a new CloudStorageAPI.
func getNewCloudStorageAPI(conf cloudServerConfig) CloudStorageAPI {
fs, err := fs.New(conf.Path)
fs, err := fs.New(conf.Path, conf.MinFreeDisk, conf.MaxBuckets)
fatalIf(err.Trace(), "Initializing filesystem failed.", nil)
fs.SetMinFreeDisk(conf.MinFreeDisk)
return CloudStorageAPI{
Filesystem: fs,
AccessLog: conf.AccessLog,