Commit bf86d0cd authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Drop -mem option for unionfs.

parent 557408bc
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
func main() { func main() {
debug := flag.Bool("debug", false, "debug on") 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") portable := flag.Bool("portable", false, "use 32 bit inodes")
entry_ttl := flag.Float64("entry_ttl", 1.0, "fuse entry cache TTL.") entry_ttl := flag.Float64("entry_ttl", 1.0, "fuse entry cache TTL.")
...@@ -27,24 +26,18 @@ func main() { ...@@ -27,24 +26,18 @@ func main() {
os.Exit(2) os.Exit(2)
} }
var nodeFs fuse.NodeFileSystem ufsOptions := unionfs.UnionFsOptions{
if *mem { DeletionCacheTTLSecs: *delcache_ttl,
nodeFs = unionfs.NewMemUnionFs( BranchCacheTTLSecs: *branchcache_ttl,
flag.Arg(1)+"/", &fuse.LoopbackFileSystem{Root: flag.Arg(2)}) DeletionDirName: *deldirname,
} else { }
ufsOptions := unionfs.UnionFsOptions{
DeletionCacheTTLSecs: *delcache_ttl,
BranchCacheTTLSecs: *branchcache_ttl,
DeletionDirName: *deldirname,
}
ufs, err := unionfs.NewUnionFsFromRoots(flag.Args()[1:], &ufsOptions, true) ufs, err := unionfs.NewUnionFsFromRoots(flag.Args()[1:], &ufsOptions, true)
if err != nil { if err != nil {
log.Fatal("Cannot create UnionFs", err) log.Fatal("Cannot create UnionFs", err)
os.Exit(1) os.Exit(1)
}
nodeFs = fuse.NewPathNodeFs(ufs, &fuse.PathNodeFsOptions{ClientInodes: true})
} }
nodeFs := fuse.NewPathNodeFs(ufs, &fuse.PathNodeFsOptions{ClientInodes: true})
mOpts := fuse.FileSystemOptions{ mOpts := fuse.FileSystemOptions{
EntryTimeout: *entry_ttl, EntryTimeout: *entry_ttl,
AttrTimeout: *entry_ttl, AttrTimeout: *entry_ttl,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment