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
47d385f2
Commit
47d385f2
authored
Sep 07, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OnForget to FsNode interface.
parent
55831d20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
fuse/api.go
fuse/api.go
+5
-2
fuse/defaultnode.go
fuse/defaultnode.go
+3
-0
fuse/fsconnector.go
fuse/fsconnector.go
+1
-0
No files found.
fuse/api.go
View file @
47d385f2
...
...
@@ -27,12 +27,15 @@ type FsNode interface {
// The following are called by the FileSystemConnector
Inode
()
*
Inode
SetInode
(
node
*
Inode
)
// RmChild and AddChild run inside the critical section for
// the mutex behind Inode().LockTree().
RmChild
(
name
string
,
child
FsNode
)
AddChild
(
name
string
,
child
FsNode
)
Lookup
(
name
string
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
OnForget
()
// Misc.
Access
(
mode
uint32
,
context
*
Context
)
(
code
Status
)
Readlink
(
c
*
Context
)
([]
byte
,
Status
)
...
...
fuse/defaultnode.go
View file @
47d385f2
...
...
@@ -40,6 +40,9 @@ func (me *DefaultFsNode) Inode() *Inode {
return
me
.
inode
}
func
(
me
*
DefaultFsNode
)
OnForget
()
{
}
func
(
me
*
DefaultFsNode
)
RmChild
(
name
string
,
child
FsNode
)
{
}
...
...
fuse/fsconnector.go
View file @
47d385f2
...
...
@@ -139,6 +139,7 @@ func (me *FileSystemConnector) considerDropInode(n *Inode) (drop bool) {
if
ch
==
nil
{
panic
(
fmt
.
Sprintf
(
"trying to del child %q, but not present"
,
k
))
}
ch
.
fsInode
.
OnForget
()
me
.
inodeMap
.
Forget
(
ch
.
nodeId
)
}
...
...
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