aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-10-30 21:22:20 -0700
committerChris Lu <chris.lu@gmail.com>2020-10-30 21:22:20 -0700
commit8826601be1a5fe563d955b57a51b15d917baa22b (patch)
treedef9ca688158ad773a3398b6c83d62157b7d9b8a /weed/command/mount.go
parentbe95f68ca744fb3caa5f7e48aff79bc2b233686e (diff)
downloadseaweedfs-8826601be1a5fe563d955b57a51b15d917baa22b.tar.xz
seaweedfs-8826601be1a5fe563d955b57a51b15d917baa22b.zip
mount: optional limit for the number of concurrent writers
Diffstat (limited to 'weed/command/mount.go')
-rw-r--r--weed/command/mount.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/command/mount.go b/weed/command/mount.go
index 7fdb21254..f325cb0a5 100644
--- a/weed/command/mount.go
+++ b/weed/command/mount.go
@@ -14,6 +14,7 @@ type MountOptions struct {
replication *string
ttlSec *int
chunkSizeLimitMB *int
+ concurrentWriters *int
cacheDir *string
cacheSizeMB *int64
dataCenter *string
@@ -42,6 +43,7 @@ func init() {
mountOptions.replication = cmdMount.Flag.String("replication", "", "replication(e.g. 000, 001) to create to files. If empty, let filer decide.")
mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds")
mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 2, "local write buffer size, also chunk large files")
+ mountOptions.concurrentWriters = cmdMount.Flag.Int("concurrentWriters", 0, "limit concurrent goroutine writers if not 0")
mountOptions.cacheDir = cmdMount.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks and meta data")
mountOptions.cacheSizeMB = cmdMount.Flag.Int64("cacheCapacityMB", 1000, "local file chunk cache capacity in MB (0 will disable cache)")
mountOptions.dataCenter = cmdMount.Flag.String("dataCenter", "", "prefer to write to the data center")