Browse Source

mount: accept all extra mount options

fix https://github.com/seaweedfs/seaweedfs/issues/3767
pull/3770/head
chrislu 2 years ago
parent
commit
8e81619d02
  1. 2
      weed/command/fuse.go
  2. 1
      weed/command/mount.go
  3. 2
      weed/command/mount_std.go

2
weed/command/fuse.go

@ -190,6 +190,8 @@ func runFuse(cmd *Command, args []string) bool {
} }
case "fusermount.path": case "fusermount.path":
fusermountPath = parameter.value fusermountPath = parameter.value
default:
mountOptions.extraOptions = append(mountOptions.extraOptions, fmt.Sprintf("%s:%s", parameter.name, parameter.value))
} }
} }

1
weed/command/mount.go

@ -31,6 +31,7 @@ type MountOptions struct {
debugPort *int debugPort *int
localSocket *string localSocket *string
disableXAttr *bool disableXAttr *bool
extraOptions []string
} }
var ( var (

2
weed/command/mount_std.go

@ -166,7 +166,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
// mount fuse // mount fuse
fuseMountOptions := &fuse.MountOptions{ fuseMountOptions := &fuse.MountOptions{
AllowOther: *option.allowOthers, AllowOther: *option.allowOthers,
Options: nil,
Options: option.extraOptions,
MaxBackground: 128, MaxBackground: 128,
MaxWrite: 1024 * 1024 * 2, MaxWrite: 1024 * 1024 * 2,
MaxReadAhead: 1024 * 1024 * 2, MaxReadAhead: 1024 * 1024 * 2,

Loading…
Cancel
Save