Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
a3ed4324
Commit
a3ed4324
authored
Mar 01, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: add README.md to document decisions and rationales.
parent
df8980ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
nodefs/README.md
nodefs/README.md
+63
-0
No files found.
nodefs/README.md
0 → 100644
View file @
a3ed4324
Objective
=========
A high-performance FUSE API that minimizes pitfalls with writing
correct filesystems.
Decisions
=========
*
Nodes contain references to their children. This is useful
because most filesystems will need to construct tree-like structures.
*
Nodes can be "persistent", meaning their lifetime is not under
control of the kernel. This is useful for constructing FS trees
in advance.
*
The NodeID (used for communicating with kernel) is equal to
Attr.Ino (value shown in Stat and Lstat return values.)
*
No global treelock, to ensure scalability.
*
Immutable characteristics of the Inode are passed on
creation. These are {NodeID, Mode}. Files cannot change type
during their lifetime. It also prevents the common error of
forgetting to return the filetype in Lookup/GetAttr.
To decide
=========
*
Should we provide automatic fileID numbering?
*
Should OpenDir/ReadDir read the entire directory in one go?
*
One giant interface with many methods, or many one-method interfaces?
*
one SetAttr method, or many (Chown, Truncate, etc.)
*
function signatures, or types? The latter is easier to remember?
Easier to extend?
```
func Lookup(name string, out *EntryOut) (Node, Status) {
}
type LookupOp struct {
// in
Name string
// out
Child Node
Out *EntryOut
}
func Lookup(op LookupOp)
```
*
What to do with semi-unused fields (CreateIn.Umask, OpenIn.Mode, etc.)
*
cancellation through context.Context (standard, more GC overhead)
or a custom context (could reuse across requests.)?
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment