aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-11 21:12:41 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-11 21:12:41 -0700
commitdf97da25f902912dd527d4aed567408c3ca0f9ae (patch)
tree3e5d4d6bcfb69b3ab869c0b519048943f26e69a1 /weed/command/mount_std.go
parentc8ca234773e2a0c57c503c1f3464d1ded4edd2df (diff)
downloadseaweedfs-df97da25f902912dd527d4aed567408c3ca0f9ae.tar.xz
seaweedfs-df97da25f902912dd527d4aed567408c3ca0f9ae.zip
mount: add on disk caching
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 148540dec..0f87d6aee 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -129,7 +129,6 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
}
options = append(options, osSpecificMountOptions()...)
-
if *option.allowOthers {
options = append(options, fuse.AllowOther())
}
@@ -137,12 +136,12 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
options = append(options, fuse.AllowNonEmptyMount())
}
+ // mount
c, err := fuse.Mount(dir, options...)
if err != nil {
glog.V(0).Infof("mount: %v", err)
return true
}
-
defer fuse.Unmount(dir)
util.OnInterrupt(func() {
@@ -164,7 +163,8 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
Replication: *option.replication,
TtlSec: int32(*option.ttlSec),
ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024,
- ChunkCacheCountLimit: *option.chunkCacheCountLimit,
+ CacheDir: *option.cacheDir,
+ CacheSizeMB: *option.cacheSizeMB,
DataCenter: *option.dataCenter,
DirListCacheLimit: *option.dirListCacheLimit,
EntryCacheTtl: 3 * time.Second,