Skip to content

Commit 60eaf8f

Browse files
committed
Remove macOS support
OSXFUSE is no longer open source, see e.g. https://colatkinson.site/macos/fuse/2019/09/29/osxfuse/ It looks like Apple is killing the whole category: https://news.ycombinator.com/item?id=22251076 I will not personally put uncompensated effort into supporting non-open source environments, especially ones that are this hostile to work with. The macOS kludges were a significant amount of code, about 25% of the remaining non-test lines, and the primary source of complexity and alternate code paths. The API definitions will be remain for a short while, with deprecation markers. This should let multiplatform callers work without changes. Everything deprecated will be removed soon, so please adjust your code. Fixes #224
1 parent 5883e5a commit 60eaf8f

49 files changed

Lines changed: 237 additions & 1702 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,22 @@ seqdiag {
1717
fusermount -> kernel [label="mount(2)"];
1818
kernel ->> mounts [label="mount is visible"];
1919
fusermount <-- kernel [label="mount(2) returns"];
20-
fuse <<-- fusermount [diagonal, label="exit, receive /dev/fuse fd", leftnote="on Linux, successful exit here\nmeans the mount has happened,\nthough InitRequest might not have yet"];
21-
app <-- fuse [label="Mount returns\nConn.Ready is already closed"];
20+
fuse <<-- fusermount [diagonal, label="exit, receive /dev/fuse fd"];
2221

23-
app -> fuse [label="fs.Serve"];
24-
fuse => kernel [label="read /dev/fuse fd", note="starts with InitRequest"];
25-
fuse -> app [label="Init"];
26-
fuse <-- app [color=red];
22+
fuse => kernel [label="read /dev/fuse fd: InitRequest"];
2723
fuse -> kernel [label="write /dev/fuse fd", color=red];
2824
kernel -> kernel [label="set connection\nstate to error", color=red];
2925
fuse <-- kernel;
30-
... conn.MountError == nil, so it is still mounted ...
31-
... call conn.Close to clean up ...
26+
27+
... Mount calls Unmount to clean up ...
28+
fuse -> fusermount [label="fusermount -u"];
29+
fusermount -> kernel;
30+
kernel <<-- mounts;
31+
fusermount <-- kernel;
32+
fuse <<-- fusermount [diagonal];
33+
34+
fuse => kernel [label="close /dev/fuse fd"];
35+
fuse <<-- kernel [diagonal, label="/dev/fuse is released"];
36+
37+
app <-- fuse [label="Mount returns", color=red];
3238
}

doc/mount-error-init.seq.png

22.5 KB
Loading

doc/mount-linux-error-init.seq.png

-28.5 KB
Binary file not shown.

doc/mount-linux.seq.png

-43.6 KB
Binary file not shown.

doc/mount-osx-error-init.seq

Lines changed: 0 additions & 32 deletions
This file was deleted.

doc/mount-osx-error-init.seq.png

-31.9 KB
Binary file not shown.

doc/mount-osx.seq

Lines changed: 0 additions & 45 deletions
This file was deleted.

doc/mount-osx.seq.png

-50.2 KB
Binary file not shown.

doc/mount-sequence.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,14 @@ more complex API on us.
77

88
## Successful runs
99

10-
On Linux, the mount is immediate and file system accesses wait until
11-
the requests are served.
10+
The mount is immediate and file system accesses wait until the requests are served.
1211

13-
![Diagram of Linux FUSE mount sequence](mount-linux.seq.png)
14-
15-
On OS X, the mount becomes visible only after `InitRequest` (and maybe
16-
more) have been served.
17-
18-
![Diagram of OSXFUSE mount sequence](mount-osx.seq.png)
12+
![Diagram of the mount sequence](mount.seq.png)
1913

2014

2115
## Errors
2216

23-
Let's see what happens if `InitRequest` gets an error response. On
24-
Linux, the mountpoint is there but all operations will fail:
25-
26-
![Diagram of Linux error handling](mount-linux-error-init.seq.png)
27-
28-
On OS X, the mount never happened:
17+
Let's see what happens if `InitRequest` gets an error response.
18+
The mountpoint is temporarily there but all operations will fail:
2919

30-
![Diagram of OS X error handling](mount-osx-error-init.seq.png)
20+
![Diagram of error handling](mount-error-init.seq.png)
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
seqdiag {
2-
// seqdiag -T svg -o doc/mount-osx.svg doc/mount-osx.seq
2+
// seqdiag -T svg -o doc/mount.svg doc/mount.seq
33
app;
44
fuse [label="bazil.org/fuse"];
55
fusermount;
@@ -12,16 +12,21 @@ seqdiag {
1212
fusermount -> kernel [label="mount(2)"];
1313
kernel ->> mounts [label="mount is visible"];
1414
fusermount <-- kernel [label="mount(2) returns"];
15-
fuse <<-- fusermount [diagonal, label="exit, receive /dev/fuse fd", leftnote="on Linux, successful exit here\nmeans the mount has happened,\nthough InitRequest might not have yet"];
16-
app <-- fuse [label="Mount returns\nConn.Ready is already closed", rightnote="InitRequest and StatfsRequest\nmay or may not be seen\nbefore Conn.Ready,\ndepending on platform"];
15+
fuse <<-- fusermount [diagonal, label="exit, receive /dev/fuse fd"];
16+
17+
fuse => kernel [label="read /dev/fuse fd: InitRequest"];
18+
fuse => kernel [label="write /dev/fuse fd: InitResponse"];
19+
20+
app <-- fuse [label="Mount returns"];
1721

1822
app -> fuse [label="fs.Serve"];
19-
fuse => kernel [label="read /dev/fuse fd", note="starts with InitRequest"];
23+
fuse => kernel [label="read /dev/fuse fd"];
2024
fuse => app [label="FS/Node/Handle methods"];
2125
fuse => kernel [label="write /dev/fuse fd"];
2226
... repeat ...
2327

2428
... shutting down ...
29+
fuse -> kernel [label="read /dev/fuse fd"];
2530
app -> fuse [label="Unmount"];
2631
fuse -> fusermount [label="fusermount -u"];
2732
fusermount -> kernel;
@@ -31,11 +36,11 @@ seqdiag {
3136
app <-- fuse [label="Unmount returns"];
3237

3338
// actually triggers before above
34-
fuse <<-- kernel [diagonal, label="/dev/fuse EOF"];
39+
fuse <-- kernel [diagonal, label="/dev/fuse EOF"];
3540
app <-- fuse [label="fs.Serve returns"];
3641

3742
app -> fuse [label="conn.Close"];
38-
fuse -> kernel [label="close /dev/fuse fd"];
39-
fuse <-- kernel;
43+
fuse => kernel [label="close /dev/fuse fd"];
44+
fuse <<-- kernel [diagonal, label="/dev/fuse is released"];
4045
app <-- fuse;
4146
}

0 commit comments

Comments
 (0)