diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-10-10 20:09:43 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-10-10 20:09:43 -0700 |
| commit | d155f907c2759ce8c14f50952fd7ea4a68bcac65 (patch) | |
| tree | b1215babf3931df8f93e24449686a2583c6ec0e4 /weed/command/mount.go | |
| parent | 9b0e8ef026cd74e8c641e922c79a54c5154e5a6b (diff) | |
| download | seaweedfs-d155f907c2759ce8c14f50952fd7ea4a68bcac65.tar.xz seaweedfs-d155f907c2759ce8c14f50952fd7ea4a68bcac65.zip | |
mount: configurable read wait time
Diffstat (limited to 'weed/command/mount.go')
| -rw-r--r-- | weed/command/mount.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/weed/command/mount.go b/weed/command/mount.go index 7bf59cdc7..42a79bd1f 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -2,6 +2,7 @@ package command import ( "os" + "time" ) type MountOptions struct { @@ -25,9 +26,10 @@ type MountOptions struct { } var ( - mountOptions MountOptions - mountCpuProfile *string - mountMemProfile *string + mountOptions MountOptions + mountCpuProfile *string + mountMemProfile *string + mountReadRetryTime *time.Duration ) func init() { @@ -46,11 +48,13 @@ func init() { mountOptions.allowOthers = cmdMount.Flag.Bool("allowOthers", true, "allows other users to access the file system") mountOptions.umaskString = cmdMount.Flag.String("umask", "022", "octal umask, e.g., 022, 0111") mountOptions.nonempty = cmdMount.Flag.Bool("nonempty", false, "allows the mounting over a non-empty directory") - mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file") - mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file") mountOptions.outsideContainerClusterMode = cmdMount.Flag.Bool("outsideContainerClusterMode", false, "allows other users to access the file system") mountOptions.uidMap = cmdMount.Flag.String("map.uid", "", "map local uid to uid on filer, comma-separated <local_uid>:<filer_uid>") mountOptions.gidMap = cmdMount.Flag.String("map.gid", "", "map local gid to gid on filer, comma-separated <local_gid>:<filer_gid>") + + mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file") + mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file") + mountReadRetryTime = cmdMount.Flag.Duration("readRetryTime", 6*time.Second, "maximum read retry wait time") } var cmdMount = &Command{ |
