diff options
| author | Chris Lu <chris.lu@gmail.com> | 2017-01-08 11:01:46 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2017-01-08 11:01:46 -0800 |
| commit | ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0 (patch) | |
| tree | e4c444173b30053d83b9a0b9ad9d8e2063f44c14 /weed/storage/volume.go | |
| parent | 7b6837cbc2b2c27b6acdc2c41d88cd27d0823e60 (diff) | |
| download | seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.tar.xz seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.zip | |
support Fallocate on linux
Diffstat (limited to 'weed/storage/volume.go')
| -rw-r--r-- | weed/storage/volume.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 11ee600df..df9f0b7a7 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -29,11 +29,11 @@ type Volume struct { lastCompactRevision uint16 } -func NewVolume(dirname string, collection string, id VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *TTL) (v *Volume, e error) { +func NewVolume(dirname string, collection string, id VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *TTL, preallocate int64) (v *Volume, e error) { v = &Volume{dir: dirname, Collection: collection, Id: id} v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} v.needleMapKind = needleMapKind - e = v.load(true, true, needleMapKind) + e = v.load(true, true, needleMapKind, preallocate) return } func (v *Volume) String() string { |
