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
4bc4f55c
Commit
4bc4f55c
authored
Apr 21, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maybe drop inode on closing file as well.
parent
6ff9f82d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+16
-10
No files found.
fuse/pathfilesystem.go
View file @
4bc4f55c
...
@@ -279,17 +279,21 @@ func (me *PathFileSystemConnector) forgetUpdate(nodeId uint64, forgetCount int)
...
@@ -279,17 +279,21 @@ func (me *PathFileSystemConnector) forgetUpdate(nodeId uint64, forgetCount int)
data
,
ok
:=
me
.
inodeMap
[
nodeId
]
data
,
ok
:=
me
.
inodeMap
[
nodeId
]
if
ok
{
if
ok
{
data
.
LookupCount
-=
forgetCount
data
.
LookupCount
-=
forgetCount
me
.
considerDropInode
(
data
)
}
}
if
data
.
mount
!=
nil
{
func
(
me
*
PathFileSystemConnector
)
considerDropInode
(
n
*
inode
)
{
data
.
mount
.
mutex
.
RLock
()
if
n
.
mount
!=
nil
{
defer
data
.
mount
.
mutex
.
RUnlock
()
n
.
mount
.
mutex
.
RLock
()
defer
n
.
mount
.
mutex
.
RUnlock
()
}
}
// TODO - this should probably not happen at all.
// TODO - this should probably not happen at all.
if
data
.
LookupCount
<=
0
&&
len
(
data
.
Children
)
==
0
&&
(
data
.
mount
==
nil
||
data
.
mount
.
unmountPending
)
{
if
(
n
.
LookupCount
<=
0
&&
len
(
n
.
Children
)
==
0
&&
(
n
.
mount
==
nil
||
n
.
mount
.
unmountPending
)
&&
data
.
setParent
(
nil
)
n
.
OpenCount
<=
0
)
{
me
.
inodeMap
[
nodeId
]
=
nil
,
false
n
.
setParent
(
nil
)
}
me
.
inodeMap
[
n
.
NodeId
]
=
nil
,
false
}
}
}
}
...
@@ -769,12 +773,14 @@ func (me *PathFileSystemConnector) Release(header *InHeader, input *ReleaseIn) {
...
@@ -769,12 +773,14 @@ func (me *PathFileSystemConnector) Release(header *InHeader, input *ReleaseIn) {
_
,
_
,
node
:=
me
.
GetPath
(
header
.
NodeId
)
_
,
_
,
node
:=
me
.
GetPath
(
header
.
NodeId
)
f
:=
me
.
unregisterFile
(
node
,
input
.
Fh
)
.
(
FuseFile
)
f
:=
me
.
unregisterFile
(
node
,
input
.
Fh
)
.
(
FuseFile
)
f
.
Release
()
f
.
Release
()
me
.
considerDropInode
(
node
)
}
}
func
(
me
*
PathFileSystemConnector
)
ReleaseDir
(
header
*
InHeader
,
input
*
ReleaseIn
)
{
func
(
me
*
PathFileSystemConnector
)
ReleaseDir
(
header
*
InHeader
,
input
*
ReleaseIn
)
{
_
,
_
,
node
:=
me
.
GetPath
(
header
.
NodeId
)
_
,
_
,
node
:=
me
.
GetPath
(
header
.
NodeId
)
d
:=
me
.
unregisterFile
(
node
,
input
.
Fh
)
.
(
RawFuseDir
)
d
:=
me
.
unregisterFile
(
node
,
input
.
Fh
)
.
(
RawFuseDir
)
d
.
Release
()
d
.
Release
()
me
.
considerDropInode
(
node
)
}
}
func
(
me
*
PathFileSystemConnector
)
FsyncDir
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
PathFileSystemConnector
)
FsyncDir
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
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