fuse: forget fs.Node instances on request by the kernel

Forget fs.Node instances once the kernel frees the corresponding nodeId.
This ensures that restic does not run out of memory on large snapshots.
This commit is contained in:
Michael Eischer committed 2024-09-14 18:11:44 +02:00
1 parent e9940f39dc
commit 51173c5003
8 files changed
+86 -39

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ func NewRoot(repo restic.Repository, cfg Config) *Root {
}
}
root.SnapshotsDir = NewSnapshotsDir(root, rootInode, rootInode, NewSnapshotsDirStructure(root, cfg.PathTemplates, cfg.TimeTemplate), "")
root.SnapshotsDir = NewSnapshotsDir(root, func() {}, rootInode, rootInode, NewSnapshotsDirStructure(root, cfg.PathTemplates, cfg.TimeTemplate), "")
return root
}