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
c5f5d8c0
Commit
c5f5d8c0
authored
Sep 08, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation TODO.
parent
c403ae36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
fuse/fsconnector.go
fuse/fsconnector.go
+16
-7
No files found.
fuse/fsconnector.go
View file @
c5f5d8c0
package
fuse
// This file contains the internal logic of the
// FileSystemConnector. The functions for satisfying the raw interface
are in
// fsops.go
// FileSystemConnector. The functions for satisfying the raw interface
//
are in
fsops.go
/* TODO - document overall structure and locking strategy.
"at a first glance, questions that come up: why doesn't fsconnector
have the lock, why does every node need it? (I have some ideas, but
they take a while to verify)"
"a short sum up on how the forget count is handled"
*/
import
(
"fmt"
"log"
...
...
@@ -47,7 +56,7 @@ func NewFileSystemConnector(nodeFs NodeFileSystem, opts *FileSystemOptions) (me
// FUSE does not issue a LOOKUP for 1 (obviously), but it does
// issue a forget. This lookupCount is to make the counts match.
me
.
lookupUpdate
(
me
.
rootNode
)
me
.
verify
()
me
.
MountRoot
(
nodeFs
,
opts
)
return
me
...
...
@@ -75,7 +84,7 @@ func (me *FileSystemConnector) createChild(parent *Inode, name string, fi *os.Fi
parent
.
addChild
(
name
,
child
)
}
me
.
lookupUpdate
(
child
)
out
=
parent
.
mount
.
fileInfoToEntry
(
fi
)
out
.
Ino
=
child
.
nodeId
out
.
NodeId
=
child
.
nodeId
...
...
@@ -121,7 +130,7 @@ func (me *FileSystemConnector) forgetUpdate(node *Inode, forgetCount int) {
}
else
if
node
.
lookupCount
<
0
{
panic
(
fmt
.
Sprintf
(
"lookupCount underflow: %d: %v"
,
node
.
lookupCount
,
me
))
}
me
.
recursiveConsiderDropInode
(
node
)
}
...
...
@@ -317,7 +326,7 @@ func (me *FileSystemConnector) Unmount(node *Inode) Status {
parentNode
.
mounts
[
name
]
=
nil
,
false
parentNode
.
children
[
name
]
=
nil
,
false
mount
.
fs
.
OnUnmount
()
me
.
EntryNotify
(
parentNode
,
name
)
return
OK
...
...
@@ -334,7 +343,7 @@ func (me *FileSystemConnector) FileNotify(node *Inode, off int64, length int64)
out
:=
NotifyInvalInodeOut
{
Length
:
length
,
Off
:
off
,
Ino
:
n
,
Ino
:
n
,
}
return
me
.
fsInit
.
InodeNotify
(
&
out
)
}
...
...
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