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
Kirill Smelkov
go-fuse
Commits
bf86d0cd
Commit
bf86d0cd
authored
Nov 19, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop -mem option for unionfs.
parent
557408bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
example/unionfs/main.go
example/unionfs/main.go
+10
-17
No files found.
example/unionfs/main.go
View file @
bf86d0cd
...
...
@@ -11,7 +11,6 @@ import (
func
main
()
{
debug
:=
flag
.
Bool
(
"debug"
,
false
,
"debug on"
)
mem
:=
flag
.
Bool
(
"mem"
,
false
,
"use in-memory unionfs"
)
portable
:=
flag
.
Bool
(
"portable"
,
false
,
"use 32 bit inodes"
)
entry_ttl
:=
flag
.
Float64
(
"entry_ttl"
,
1.0
,
"fuse entry cache TTL."
)
...
...
@@ -27,24 +26,18 @@ func main() {
os
.
Exit
(
2
)
}
var
nodeFs
fuse
.
NodeFileSystem
if
*
mem
{
nodeFs
=
unionfs
.
NewMemUnionFs
(
flag
.
Arg
(
1
)
+
"/"
,
&
fuse
.
LoopbackFileSystem
{
Root
:
flag
.
Arg
(
2
)})
}
else
{
ufsOptions
:=
unionfs
.
UnionFsOptions
{
DeletionCacheTTLSecs
:
*
delcache_ttl
,
BranchCacheTTLSecs
:
*
branchcache_ttl
,
DeletionDirName
:
*
deldirname
,
}
ufsOptions
:=
unionfs
.
UnionFsOptions
{
DeletionCacheTTLSecs
:
*
delcache_ttl
,
BranchCacheTTLSecs
:
*
branchcache_ttl
,
DeletionDirName
:
*
deldirname
,
}
ufs
,
err
:=
unionfs
.
NewUnionFsFromRoots
(
flag
.
Args
()[
1
:
],
&
ufsOptions
,
true
)
if
err
!=
nil
{
log
.
Fatal
(
"Cannot create UnionFs"
,
err
)
os
.
Exit
(
1
)
}
nodeFs
=
fuse
.
NewPathNodeFs
(
ufs
,
&
fuse
.
PathNodeFsOptions
{
ClientInodes
:
true
})
ufs
,
err
:=
unionfs
.
NewUnionFsFromRoots
(
flag
.
Args
()[
1
:
],
&
ufsOptions
,
true
)
if
err
!=
nil
{
log
.
Fatal
(
"Cannot create UnionFs"
,
err
)
os
.
Exit
(
1
)
}
nodeFs
:=
fuse
.
NewPathNodeFs
(
ufs
,
&
fuse
.
PathNodeFsOptions
{
ClientInodes
:
true
})
mOpts
:=
fuse
.
FileSystemOptions
{
EntryTimeout
:
*
entry_ttl
,
AttrTimeout
:
*
entry_ttl
,
...
...
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