summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node_helpers.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-03-21 09:02:50 +0100
committerJakob Unterwurzacher2021-03-21 09:02:50 +0100
commit47a4d33f24509ac9db6b924f84a7102cbe0f98c3 (patch)
treea465cf393f767e2f082ee04c825724ed7c58cd99 /internal/fusefrontend/node_helpers.go
parent692a79461a7b0f60625ecf8b1a136bc6595f1273 (diff)
fusefrontend: -sharedstorage: fix TestRmwRace failure
The Open() and Create() paths used different inode numbers, which broke openfiletable locking against concurred readers.
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 f99e6df..a8d1ebe 100644
--- a/internal/fusefrontend/node_helpers.go
+++ b/internal/fusefrontend/node_helpers.go
@@ -100,7 +100,8 @@ 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.
+// The passed-in `st` will be modified to get a unique inode number
+// (or, in `-sharedstorage` mode, the inode number will be set to zero).
func (n *Node) newChild(ctx context.Context, st *syscall.Stat_t, out *fuse.EntryOut) *fs.Inode {
rn := n.rootNode()
// Get stable inode number based on underlying (device,ino) pair