aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-06-02 00:35:03 -0700
committerChris Lu <chris.lu@gmail.com>2018-06-02 00:35:03 -0700
commitc546c309f10154688431433c031d62dc20edfc85 (patch)
tree69670656b3f740cd1f05e8fe646d2cae51c9aff5 /weed/command/mount_std.go
parent3a3553dc463a8f5f5739b58e325da4f14650517b (diff)
parenta146a48ccc16848a9c2f24b64864e9566db8ab7c (diff)
downloadseaweedfs-c546c309f10154688431433c031d62dc20edfc85.tar.xz
seaweedfs-c546c309f10154688431433c031d62dc20edfc85.zip
Merge branch 'filer2_development'
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 4908bdbff..d8b6884ff 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -8,9 +8,9 @@ import (
"bazil.org/fuse"
"bazil.org/fuse/fs"
+ "github.com/chrislusf/seaweedfs/weed/filesys"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/util"
- "github.com/chrislusf/seaweedfs/weed/filesys"
)
func runMount(cmd *Command, args []string) bool {
@@ -19,6 +19,10 @@ func runMount(cmd *Command, args []string) bool {
fmt.Printf("Please specify the mount directory via \"-dir\"")
return false
}
+ if *mountOptions.chunkSizeLimitMB <= 0 {
+ fmt.Printf("Please specify a reasonable buffer size.")
+ return false
+ }
fuse.Unmount(*mountOptions.dir)
@@ -47,7 +51,8 @@ func runMount(cmd *Command, args []string) bool {
c.Close()
})
- err = fs.Serve(c, filesys.NewSeaweedFileSystem(*mountOptions.filer))
+ err = fs.Serve(c, filesys.NewSeaweedFileSystem(
+ *mountOptions.filer, *mountOptions.collection, *mountOptions.replication, *mountOptions.chunkSizeLimitMB))
if err != nil {
fuse.Unmount(*mountOptions.dir)
}