From a662d17105daab1409da8f0b0e02bc1789827b06 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 7 Feb 2021 12:57:21 +0000 Subject: [PATCH] mountlib: add --mount-tpslimit flag --- cmd/mountlib/mount.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 0f0944183..a48f2a92e 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -45,6 +45,7 @@ type Options struct { DaemonTimeout time.Duration // OSXFUSE only AsyncRead bool NetworkMode bool // Windows only + TPSLimit float64 } // DefaultOpt is the default values for creating the mount @@ -97,6 +98,7 @@ func AddFlags(flagSet *pflag.FlagSet) { flags.BoolVarP(flagSet, &Opt.AsyncRead, "async-read", "", Opt.AsyncRead, "Use asynchronous reads. Not supported on Windows.") flags.FVarP(flagSet, &Opt.MaxReadAhead, "max-read-ahead", "", "The number of bytes that can be prefetched for sequential reads. Not supported on Windows.") flags.BoolVarP(flagSet, &Opt.WritebackCache, "write-back-cache", "", Opt.WritebackCache, "Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used. Not supported on Windows.") + flags.Float64VarP(flagSet, &Opt.TPSLimit, "mount-tpslimit", "", 0, "Limit mount transactions per second to this. (0 is off).") // Windows and OSX flags.StringVarP(flagSet, &Opt.VolumeName, "volname", "", Opt.VolumeName, "Set the volume name. Supported on Windows and OSX only.") // OSX only