Commit 34ef5c4d authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

In autounion.go add PathNodeFsOptions to AutoUnionFsOptions, and use

them for new mounts.
parent 4c9a5b84
......@@ -41,13 +41,13 @@ func main() {
Owner: fuse.CurrentOwner(),
},
UpdateOnMount: true,
}
pathOptions := fuse.PathNodeFsOptions{
ClientInodes: *hardlinks,
fuse.PathNodeFsOptions{
ClientInodes: *hardlinks,
}
}
gofs := unionfs.NewAutoUnionFs(flag.Arg(1), options)
pathfs := fuse.NewPathNodeFs(gofs, &pathOptions)
pathfs := fuse.NewPathNodeFs(gofs, nil)
state, conn, err := fuse.MountNodeFileSystem(flag.Arg(0), pathfs, nil)
if err != nil {
fmt.Printf("Mount fail: %v\n", err)
......
......@@ -38,6 +38,7 @@ type AutoUnionFs struct {
type AutoUnionFsOptions struct {
UnionFsOptions
fuse.FileSystemOptions
fuse.PathNodeFsOptions
// If set, run updateKnownFses() after mounting.
UpdateOnMount bool
......@@ -110,7 +111,7 @@ func (me *AutoUnionFs) createFs(name string, roots []string) fuse.Status {
}
log.Printf("Adding workspace %v for roots %v", name, ufs.Name())
nfs := fuse.NewPathNodeFs(ufs, nil)
nfs := fuse.NewPathNodeFs(ufs, &me.options.PathNodeFsOptions)
code := me.nodeFs.Mount(name, nfs, &me.options.FileSystemOptions)
if code.Ok() {
me.knownFileSystems[name] = knownFs{
......
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