mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
FUSE: add os specific mount options
related to https://github.com/chrislusf/seaweedfs/issues/1094
This commit is contained in:
parent
71eb8efd20
commit
eb2172f63f
10
weed/command/mount_darwin.go
Normal file
10
weed/command/mount_darwin.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package command
|
||||
|
||||
import (
|
||||
|
||||
"github.com/seaweedfs/fuse"
|
||||
)
|
||||
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{}
|
||||
}
|
10
weed/command/mount_freebsd.go
Normal file
10
weed/command/mount_freebsd.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package command
|
||||
|
||||
import (
|
||||
|
||||
"github.com/seaweedfs/fuse"
|
||||
)
|
||||
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{}
|
||||
}
|
12
weed/command/mount_linux.go
Normal file
12
weed/command/mount_linux.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package command
|
||||
|
||||
import (
|
||||
|
||||
"github.com/seaweedfs/fuse"
|
||||
)
|
||||
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{
|
||||
fuse.AllowNonEmptyMount(),
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
// +build !linux
|
||||
// +build !darwin
|
||||
// +build !freebsd
|
||||
|
||||
package command
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux darwin
|
||||
// +build linux darwin freebsd
|
||||
|
||||
package command
|
||||
|
||||
|
@ -107,6 +107,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
|||
fuse.WritebackCache(),
|
||||
fuse.AllowNonEmptyMount(),
|
||||
}
|
||||
|
||||
options = append(options, osSpecificMountOptions()...)
|
||||
|
||||
if allowOthers {
|
||||
options = append(options, fuse.AllowOther())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue