summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node_helpers.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-03-07 17:22:29 +0100
committerJakob Unterwurzacher2021-03-07 17:22:29 +0100
commite2dc52a9657e530820b2d5b49ad7425b529029ce (patch)
tree75683d1194615dc2774a1b0f99850b798ade2b83 /internal/fusefrontend/node_helpers.go
parenteaca820e876bfcdc67323eac6dd43ecc420968f2 (diff)
v2api: -sharestorage: disable hard link tracking & add tests
Hard link tracking was not correctly disabled since the migration to the go-fuse v2 api. Add a test to ensure it stays off. Fixes https://github.com/rfjakob/gocryptfs/issues/525
Diffstat (limited to 'internal/fusefrontend/node_helpers.go')
-rw-r--r--internal/fusefrontend/node_helpers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fusefrontend/node_helpers.go b/internal/fusefrontend/node_helpers.go
index ad92043..f99e6df 100644
--- a/internal/fusefrontend/node_helpers.go
+++ b/internal/fusefrontend/node_helpers.go
@@ -102,8 +102,9 @@ func (n *Node) prepareAtSyscall(child string) (dirfd int, cName string, errno sy
// 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 {
- // Get unique inode number
rn := n.rootNode()
+ // Get stable inode number based on underlying (device,ino) pair
+ // (or set to zero in case of `-sharestorage`)
rn.inoMap.TranslateStat(st)
out.Attr.FromStat(st)
// Create child node