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/server/master_server_handlers_admin.go | |
| parent | 7b6837cbc2b2c27b6acdc2c41d88cd27d0823e60 (diff) | |
| download | seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.tar.xz seaweedfs-ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0.zip | |
support Fallocate on linux
Diffstat (limited to 'weed/server/master_server_handlers_admin.go')
| -rw-r--r-- | weed/server/master_server_handlers_admin.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index a762bf416..efe81bf89 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -181,10 +181,18 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr if err != nil { return nil, err } + preallocate := ms.preallocate + if r.FormValue("preallocate") != "" { + preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) + if err != nil { + return nil, fmt.Errorf("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err) + } + } volumeGrowOption := &topology.VolumeGrowOption{ Collection: r.FormValue("collection"), ReplicaPlacement: replicaPlacement, Ttl: ttl, + Prealloacte: preallocate, DataCenter: r.FormValue("dataCenter"), Rack: r.FormValue("rack"), DataNode: r.FormValue("dataNode"), |
