File: mount-sequence.md

package info (click to toggle)
golang-github-anacrolix-fuse 0.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: makefile: 5; sh: 3
file content (33 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# The mount sequence

FUSE mounting is a little bit tricky. There's a userspace helper tool
that performs the handshake with the kernel, and then steps out of the
way. This helper behaves differently on different platforms, forcing a
more complex API on us.

## Successful runs

On Linux, the mount is immediate and file system accesses wait until
the requests are served.

![Diagram of Linux FUSE mount sequence](mount-linux.seq.png)

On OS X, the mount becomes visible only after `InitRequest` (and maybe
more) have been served.

![Diagram of OSXFUSE mount sequence](mount-osx.seq.png)


## Errors

Let's see what happens if `InitRequest` gets an error response. On
Linux, the mountpoint is there but all operations will fail:

![Diagram of Linux error handling](mount-linux-error-init.seq.png)

On OS X, the mount never happened:
=======
Let's see what happens if `initRequest` gets an error response.
The mountpoint is temporarily there but all operations will fail:

![Diagram of OS X error handling](mount-osx-error-init.seq.png)