aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/node_helpers.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-16 18:40:48 +0200
committerJakob Unterwurzacher2021-08-16 19:23:58 +0200
commitb2724070d95234a8cd281f275211e0f827a8bbe1 (patch)
tree0c4efc4714d0826ac99ec40c905a111c9f9c7015 /internal/fusefrontend_reverse/node_helpers.go
parentad4b99170b9ad438909f5cba8c32109a18697a7a (diff)
reverse mode: implement -one-file-system
Fixes https://github.com/rfjakob/gocryptfs/issues/475
Diffstat (limited to 'internal/fusefrontend_reverse/node_helpers.go')
-rw-r--r--internal/fusefrontend_reverse/node_helpers.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/node_helpers.go b/internal/fusefrontend_reverse/node_helpers.go
index 92f6a87..7b286a0 100644
--- a/internal/fusefrontend_reverse/node_helpers.go
+++ b/internal/fusefrontend_reverse/node_helpers.go
@@ -91,6 +91,7 @@ func (n *Node) prepareAtSyscall(child string) (d *dirfdPlus, errno syscall.Errno
// newChild attaches a new child inode to n.
// The passed-in `st` will be modified to get a unique inode number.
func (n *Node) newChild(ctx context.Context, st *syscall.Stat_t, out *fuse.EntryOut) *fs.Inode {
+ isOtherFilesystem := (uint64(st.Dev) != n.rootNode().rootDev)
// Get unique inode number
rn := n.rootNode()
rn.inoMap.TranslateStat(st)
@@ -101,7 +102,9 @@ func (n *Node) newChild(ctx context.Context, st *syscall.Stat_t, out *fuse.Entry
Gen: 1,
Ino: st.Ino,
}
- node := &Node{}
+ node := &Node{
+ isOtherFilesystem: isOtherFilesystem,
+ }
return n.NewInode(ctx, node, id)
}