From 8e81619d0260f8023564a9897a76127e28851e00 Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 30 Sep 2022 08:40:37 -0700 Subject: [PATCH] mount: accept all extra mount options fix https://github.com/seaweedfs/seaweedfs/issues/3767 --- weed/command/fuse.go | 2 ++ weed/command/mount.go | 1 + weed/command/mount_std.go | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/weed/command/fuse.go b/weed/command/fuse.go index a0dcaa86c..c686f9b42 100644 --- a/weed/command/fuse.go +++ b/weed/command/fuse.go @@ -190,6 +190,8 @@ func runFuse(cmd *Command, args []string) bool { } case "fusermount.path": fusermountPath = parameter.value + default: + mountOptions.extraOptions = append(mountOptions.extraOptions, fmt.Sprintf("%s:%s", parameter.name, parameter.value)) } } diff --git a/weed/command/mount.go b/weed/command/mount.go index 0046ca03d..028757c25 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -31,6 +31,7 @@ type MountOptions struct { debugPort *int localSocket *string disableXAttr *bool + extraOptions []string } var ( diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 5226e708b..40b285ccf 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -166,7 +166,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { // mount fuse fuseMountOptions := &fuse.MountOptions{ AllowOther: *option.allowOthers, - Options: nil, + Options: option.extraOptions, MaxBackground: 128, MaxWrite: 1024 * 1024 * 2, MaxReadAhead: 1024 * 1024 * 2,