aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount.go
diff options
context:
space:
mode:
authorzemul <zemul@foxmail.com>2024-12-17 12:19:32 +0800
committerGitHub <noreply@github.com>2024-12-16 20:19:32 -0800
commite77e50886e937cd63175878ece20e0e0dbfc81ff (patch)
tree9e592bce4f483f61baa443cae4351549f208dfe2 /weed/command/mount.go
parentb2f26804a06eb7a663d411cd82396ce4195dfa61 (diff)
downloadseaweedfs-e77e50886e937cd63175878ece20e0e0dbfc81ff.tar.xz
seaweedfs-e77e50886e937cd63175878ece20e0e0dbfc81ff.zip
mount metacache add ttl (#6360)
* fix:mount deadlock * fix * feat: metaCache ttl * Update weed/command/mount.go Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> * fix InodeEntry --------- Co-authored-by: zemul <zhouzemiao@ihuman.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
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 3201fbb13..4fbcc0505 100644
--- a/weed/command/mount.go
+++ b/weed/command/mount.go
@@ -17,6 +17,7 @@ type MountOptions struct {
ttlSec *int
chunkSizeLimitMB *int
concurrentWriters *int
+ cacheMetaTtlSec *int
cacheDirForRead *string
cacheDirForWrite *string
cacheSizeMBForRead *int64
@@ -58,6 +59,7 @@ func init() {
mountOptions.cacheDirForRead = cmdMount.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks and meta data")
mountOptions.cacheSizeMBForRead = cmdMount.Flag.Int64("cacheCapacityMB", 128, "file chunk read cache capacity in MB")
mountOptions.cacheDirForWrite = cmdMount.Flag.String("cacheDirWrite", "", "buffer writes mostly for large files")
+ mountOptions.cacheMetaTtlSec = cmdMount.Flag.Int("cacheMetaTtlSec", 60, "metadata cache validity seconds")
mountOptions.dataCenter = cmdMount.Flag.String("dataCenter", "", "prefer to write to the data center")
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")