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/topology | |
| parent | 7b6837cbc2b2c27b6acdc2c41d88cd27d0823e60 (diff) | |
| download | seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.tar.xz seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.zip | |
support Fallocate on linux
Diffstat (limited to 'weed/topology')
| -rw-r--r-- | weed/topology/allocate_volume.go | 1 | ||||
| -rw-r--r-- | weed/topology/volume_growth.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index 7b267a805..ebf8ecbf0 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -20,6 +20,7 @@ func AllocateVolume(dn *DataNode, vid storage.VolumeId, option *VolumeGrowOption values.Add("collection", option.Collection) values.Add("replication", option.ReplicaPlacement.String()) values.Add("ttl", option.Ttl.String()) + values.Add("preallocate", fmt.Sprintf("%d", option.Prealloacte)) jsonBlob, err := util.Post("http://"+dn.Url()+"/admin/assign_volume", values) if err != nil { return err diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index 3a1c9c567..ddf687419 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -21,6 +21,7 @@ type VolumeGrowOption struct { Collection string ReplicaPlacement *storage.ReplicaPlacement Ttl *storage.TTL + Prealloacte int64 DataCenter string Rack string DataNode string |
