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
ceb0c2a3
Commit
ceb0c2a3
authored
Oct 26, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop MemUnionFs.Clear().
parent
acc0d80c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
20 deletions
+1
-20
unionfs/memunionfs.go
unionfs/memunionfs.go
+0
-19
unionfs/memunionfs_test.go
unionfs/memunionfs_test.go
+1
-1
No files found.
unionfs/memunionfs.go
View file @
ceb0c2a3
...
...
@@ -123,14 +123,6 @@ func (me *MemUnionFs) Reap() map[string]*Result {
return
m
}
func
(
me
*
MemUnionFs
)
Clear
()
{
me
.
mutex
.
Lock
()
defer
me
.
mutex
.
Unlock
()
me
.
deleted
=
make
(
map
[
string
]
bool
)
me
.
root
.
clear
(
""
)
me
.
clearBackingStore
()
}
func
(
me
*
MemUnionFs
)
clearBackingStore
()
{
f
,
err
:=
os
.
Open
(
me
.
backingStore
)
if
err
!=
nil
{
...
...
@@ -629,17 +621,6 @@ func (me *memNode) reap(path string, results map[string]*Result) {
}
}
func
(
me
*
memNode
)
clear
(
path
string
)
{
me
.
original
=
path
me
.
changed
=
false
me
.
backing
=
""
for
n
,
ch
:=
range
me
.
Inode
()
.
FsChildren
()
{
p
:=
filepath
.
Join
(
path
,
n
)
mn
:=
ch
.
FsNode
()
.
(
*
memNode
)
mn
.
clear
(
p
)
}
}
func
(
me
*
memNode
)
reset
(
path
string
)
(
entryNotify
bool
)
{
for
n
,
ch
:=
range
me
.
Inode
()
.
FsChildren
()
{
p
:=
filepath
.
Join
(
path
,
n
)
...
...
unionfs/memunionfs_test.go
View file @
ceb0c2a3
...
...
@@ -798,7 +798,7 @@ func TestMemUnionGc(t *testing.T) {
writeToFile
(
wd
+
"/mnt/file2"
,
"other-content"
)
err
:=
os
.
Remove
(
wd
+
"/mnt/file1"
)
CheckSuccess
(
err
)
ufs
.
Clear
()
ufs
.
Reset
()
entries
,
err
:=
ioutil
.
ReadDir
(
wd
+
"/backing"
)
CheckSuccess
(
err
)
...
...
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