Skip to content

Commit

Permalink
Remove support for FUSE mounts on macOS
Browse files Browse the repository at this point in the history
The NFSv4 driver that's part of the latest versions of macOS is far more
robust than OSXFUSE/macFUSE. The latter has a very high probability of
locking up your system.
  • Loading branch information
EdSchouten committed Mar 3, 2024
1 parent f5b1994 commit 9791c09
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 86 deletions.
6 changes: 0 additions & 6 deletions pkg/filesystem/virtual/configuration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ go_library(
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:darwin": [
"//pkg/filesystem/virtual/fuse",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_go_xdr//pkg/protocols/darwin_nfs_sys_prot",
"@com_github_hanwen_go_fuse_v2//fuse",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:ios": [
"//pkg/filesystem/virtual/fuse",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_go_xdr//pkg/protocols/darwin_nfs_sys_prot",
"@com_github_hanwen_go_fuse_v2//fuse",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:linux": [
Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/configuration/fuse_mount_disabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build freebsd || windows
// +build freebsd windows
//go:build darwin || freebsd || windows
// +build darwin freebsd windows

package configuration

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/configuration/fuse_mount_enabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package configuration

Expand Down
54 changes: 0 additions & 54 deletions pkg/filesystem/virtual/fuse/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,8 @@ go_library(
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:darwin": [
"//pkg/filesystem/virtual",
"@com_github_buildbarn_bb_storage//pkg/auth",
"@com_github_buildbarn_bb_storage//pkg/clock",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_bb_storage//pkg/filesystem/path",
"@com_github_buildbarn_bb_storage//pkg/util",
"@com_github_hanwen_go_fuse_v2//fuse",
"@com_github_jmespath_go_jmespath//:go-jmespath",
"@com_github_prometheus_client_golang//prometheus",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:dragonfly": [
"@org_golang_google_grpc//codes",
Expand All @@ -58,18 +48,8 @@ go_library(
"@org_golang_google_grpc//status",
],
"@io_bazel_rules_go//go/platform:ios": [
"//pkg/filesystem/virtual",
"@com_github_buildbarn_bb_storage//pkg/auth",
"@com_github_buildbarn_bb_storage//pkg/clock",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_bb_storage//pkg/filesystem/path",
"@com_github_buildbarn_bb_storage//pkg/util",
"@com_github_hanwen_go_fuse_v2//fuse",
"@com_github_jmespath_go_jmespath//:go-jmespath",
"@com_github_prometheus_client_golang//prometheus",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:js": [
"@org_golang_google_grpc//codes",
Expand Down Expand Up @@ -119,16 +99,6 @@ go_test(
"in_header_authenticator_test.go",
"simple_raw_file_system_test.go",
],
"@io_bazel_rules_go//go/platform:darwin": [
"default_attributes_injecting_raw_file_system_test.go",
"in_header_authenticator_test.go",
"simple_raw_file_system_test.go",
],
"@io_bazel_rules_go//go/platform:ios": [
"default_attributes_injecting_raw_file_system_test.go",
"in_header_authenticator_test.go",
"simple_raw_file_system_test.go",
],
"@io_bazel_rules_go//go/platform:linux": [
"default_attributes_injecting_raw_file_system_test.go",
"in_header_authenticator_test.go",
Expand All @@ -149,30 +119,6 @@ go_test(
"@com_github_jmespath_go_jmespath//:go-jmespath",
"@com_github_stretchr_testify//require",
],
"@io_bazel_rules_go//go/platform:darwin": [
":fuse",
"//internal/mock",
"//pkg/filesystem/virtual",
"@com_github_buildbarn_bb_storage//pkg/auth",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_bb_storage//pkg/filesystem/path",
"@com_github_golang_mock//gomock",
"@com_github_hanwen_go_fuse_v2//fuse",
"@com_github_jmespath_go_jmespath//:go-jmespath",
"@com_github_stretchr_testify//require",
],
"@io_bazel_rules_go//go/platform:ios": [
":fuse",
"//internal/mock",
"//pkg/filesystem/virtual",
"@com_github_buildbarn_bb_storage//pkg/auth",
"@com_github_buildbarn_bb_storage//pkg/filesystem",
"@com_github_buildbarn_bb_storage//pkg/filesystem/path",
"@com_github_golang_mock//gomock",
"@com_github_hanwen_go_fuse_v2//fuse",
"@com_github_jmespath_go_jmespath//:go-jmespath",
"@com_github_stretchr_testify//require",
],
"@io_bazel_rules_go//go/platform:linux": [
":fuse",
"//internal/mock",
Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/allow_authenticator.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/authenticator.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse_test

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/in_header_authenticator.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/in_header_authenticator_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse_test

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/metrics_raw_file_system.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/simple_raw_file_system.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse

Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/virtual/fuse/simple_raw_file_system_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin || linux
// +build darwin linux
//go:build linux
// +build linux

package fuse_test

Expand Down
8 changes: 4 additions & 4 deletions pkg/proto/configuration/filesystem/virtual/virtual.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ message MountConfiguration {
oneof backend {
// Use the kernel's FUSE driver to expose the mount.
//
// This option is supported on Linux and macOS, though its use is
// only recommended on Linux. On macOS, this option requires the
// OSXFUSE or macFUSE kernel extension to be installed. This kernel
// extension tends to cause system lockups under high load.
// This option is supported on Linux. In principle this could be
// made to work on macOS using the OSXFUSE/macFUSE kernel extension.
// Unfortunately, this kernel extension contains various bugs that
// cause system lockups under high load.
FUSEMountConfiguration fuse = 2;

// Run an in-process NFSv4 server and use the kernel's NFSv4 client
Expand Down

0 comments on commit 9791c09

Please sign in to comment.