aboutsummaryrefslogtreecommitdiff
path: root/weed/topology
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology')
-rw-r--r--weed/topology/allocate_volume.go1
-rw-r--r--weed/topology/volume_growth.go1
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