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
Levin Zimmermann
go-fuse
Commits
8b325003
Commit
8b325003
authored
Mar 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: document FS that uses Lookup
parent
ab26406a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
nodefs/api.go
nodefs/api.go
+11
-6
No files found.
nodefs/api.go
View file @
8b325003
...
@@ -43,11 +43,16 @@
...
@@ -43,11 +43,16 @@
// references, it is removed from the file system trees.
// references, it is removed from the file system trees.
//
//
// File system trees can also be constructed in advance. This is done
// File system trees can also be constructed in advance. This is done
// by instantiating "persistent" inodes
. Persistent inodes remain in
// by instantiating "persistent" inodes
from the Operations.OnAdd
// me
mory even if the kernel has forgotten them. See zip_test.go for
// me
thod. Persistent inodes remain in memory even if the kernel has
// an example of how to do this.
//
forgotten them. See zip_test.go for
an example of how to do this.
//
//
// XXX node example with Lookup.
// File systems whose tree structures are on backing storage typically
// discover the file system tree on-demand, and if the kernel is tight
// on memory, parts of the tree are forgotten again. These file
// systems should implement Operations.Lookup instead. The loopback
// file system created by `NewLoopbackRoot` provides a straightforward
// example.
//
//
package
nodefs
package
nodefs
...
@@ -142,8 +147,6 @@ type FileOperations interface {
...
@@ -142,8 +147,6 @@ type FileOperations interface {
// is optional but recommended to return a FileHandle.
// is optional but recommended to return a FileHandle.
Open
(
ctx
context
.
Context
,
flags
uint32
)
(
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
Open
(
ctx
context
.
Context
,
flags
uint32
)
(
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
// File locking
// Reads data from a file. The data should be returned as
// Reads data from a file. The data should be returned as
// ReadResult, which may be constructed from the incoming
// ReadResult, which may be constructed from the incoming
// `dest` buffer. If the file was opened without FileHandle,
// `dest` buffer. If the file was opened without FileHandle,
...
@@ -178,8 +181,10 @@ type FileOperations interface {
...
@@ -178,8 +181,10 @@ type FileOperations interface {
// never encounter ESPACE.
// never encounter ESPACE.
Allocate
(
ctx
context
.
Context
,
f
FileHandle
,
off
uint64
,
size
uint64
,
mode
uint32
)
(
status
fuse
.
Status
)
Allocate
(
ctx
context
.
Context
,
f
FileHandle
,
off
uint64
,
size
uint64
,
mode
uint32
)
(
status
fuse
.
Status
)
// FGetAttr is like GetAttr but provides a file handle if available.
FGetAttr
(
ctx
context
.
Context
,
f
FileHandle
,
out
*
fuse
.
AttrOut
)
fuse
.
Status
FGetAttr
(
ctx
context
.
Context
,
f
FileHandle
,
out
*
fuse
.
AttrOut
)
fuse
.
Status
// FSetAttr is like SetAttr but provides a file handle if available.
FSetAttr
(
ctx
context
.
Context
,
f
FileHandle
,
in
*
fuse
.
SetAttrIn
,
out
*
fuse
.
AttrOut
)
fuse
.
Status
FSetAttr
(
ctx
context
.
Context
,
f
FileHandle
,
in
*
fuse
.
SetAttrIn
,
out
*
fuse
.
AttrOut
)
fuse
.
Status
}
}
...
...
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