diff options
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/mount.go | 11 | ||||
| -rw-r--r-- | weed/command/mount_std.go | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/weed/command/mount.go b/weed/command/mount.go index 151c6bedf..f0514b93a 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -1,10 +1,11 @@ package command type MountOptions struct { - filer *string - dir *string - collection *string - replication *string + filer *string + dir *string + collection *string + replication *string + chunkSizeLimitMB *int } var ( @@ -13,11 +14,11 @@ var ( func init() { cmdMount.Run = runMount // break init cycle - cmdMount.IsDebug = cmdMount.Flag.Bool("debug", false, "verbose debug information") mountOptions.filer = cmdMount.Flag.String("filer", "localhost:8888", "weed filer location") mountOptions.dir = cmdMount.Flag.String("dir", ".", "mount weed filer to this directory") mountOptions.collection = cmdMount.Flag.String("collection", "", "collection to create the files") mountOptions.replication = cmdMount.Flag.String("replication", "000", "replication to create to files") + mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 0, "if set, limit the chunk size in MB") } var cmdMount = &Command{ diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index fcf663e1c..7e7a35f3d 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -48,7 +48,7 @@ func runMount(cmd *Command, args []string) bool { }) err = fs.Serve(c, filesys.NewSeaweedFileSystem( - *mountOptions.filer, *mountOptions.collection, *mountOptions.replication)) + *mountOptions.filer, *mountOptions.collection, *mountOptions.replication, *mountOptions.chunkSizeLimitMB)) if err != nil { fuse.Unmount(*mountOptions.dir) } |
