1
2Objective
3=========
4
5A high-performance FUSE API that minimizes pitfalls with writing
6correct filesystems.
7
8Decisions
9=========
10
11   * Nodes contain references to their children. This is useful
12     because most filesystems will need to construct tree-like
13     structures.
14
15   * Nodes contain references to their parents. As a result, we can
16     derive the path for each Inode, and there is no need for a
17     separate PathFS.
18
19   * Nodes can be "persistent", meaning their lifetime is not under
20     control of the kernel. This is useful for constructing FS trees
21     in advance, rather than driven by LOOKUP.
22
23   * The NodeID for FS tree node must be defined on creation and are
24     immutable. By contrast, reusing NodeIds (eg. rsc/bazil FUSE, as
25     well as old go-fuse/fuse/nodefs) needs extra synchronization to
26     avoid races with notify and FORGET, and makes handling the inode
27     Generation more complicated.
28
29   * The mode of an Inode is defined on creation.  Files cannot change
30     type during their lifetime. This also prevents the common error
31     of forgetting to return the filetype in Lookup/GetAttr.
32
33   * The NodeID (used for communicating with kernel) is equal to
34     Attr.Ino (value shown in Stat and Lstat return values.).
35
36   * No global treelock, to ensure scalability.
37
38   * Support for hard links. libfuse doesn't support this in the
39     high-level API.  Extra care for race conditions is needed when
40     looking up the same file through different paths.
41
42   * do not issue Notify{Entry,Delete} as part of
43     AddChild/RmChild/MvChild: because NodeIDs are unique and
44     immutable, there is no confusion about which nodes are
45     invalidated, and the notification doesn't have to happen under
46     lock.
47
48   * Directory reading uses the DirStream. Semantics for rewinding
49     directory reads, and adding files after opening (but before
50     reading) are handled automatically. No support for directory
51     seeks.
52
53   * Method names are based on syscall names. Where there is no
54     syscall (eg. "open directory"), we bias towards writing
55     everything together (Opendir)
56
57To do/To decide
58=========
59
60   * Symlink []byte vs string.
61