support Fallocate on linux

This commit is contained in:
Chris Lu
2017-01-08 11:01:46 -08:00
parent 7b6837cbc2
commit ed44f12f6d
17 changed files with 104 additions and 33 deletions

View File

@@ -36,7 +36,7 @@ func (l *DiskLocation) loadExistingVolume(dir os.FileInfo, needleMapKind NeedleM
_, found := l.volumes[vid]
mutex.RUnlock()
if !found {
if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil); e == nil {
if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0); e == nil {
mutex.Lock()
l.volumes[vid] = v
mutex.Unlock()