diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-05-29 01:21:21 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-05-29 01:21:21 -0700 |
| commit | 4e3ea49cffd2c65d1354c1406472027914775a49 (patch) | |
| tree | 530c38f60c766793706d489ed46f06919941fd72 /weed/command | |
| parent | c4b92e17d033df1e348d3ab83c1ba5603e473a4f (diff) | |
| download | seaweedfs-4e3ea49cffd2c65d1354c1406472027914775a49.tar.xz seaweedfs-4e3ea49cffd2c65d1354c1406472027914775a49.zip | |
properly working local write buffer
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/mount.go | 2 | ||||
| -rw-r--r-- | weed/command/mount_std.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/mount.go b/weed/command/mount.go index f0514b93a..6ba3b3697 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -18,7 +18,7 @@ func init() { 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") + mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 16, "local write buffer size, also chunk large files") } var cmdMount = &Command{ diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 7e7a35f3d..d8b6884ff 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -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) |
