From 2a9b99a0ef8d1eb8b067374462f31a19a098ef64 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 24 May 2020 14:57:30 +0200 Subject: [PATCH] fusefrontend: don't clear dircache on Mkdir Mkdir can not cause existing entries in the cache to go stale. So don't clear it. Benchmark results: sshfs-benchmark.bash: sshfs gocryptfs-on-sshfs git init 1.65 8.74 rsync 6.09 17.54 --- internal/fusefrontend/fs_dir.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go index 98986fe..8481d56 100644 --- a/internal/fusefrontend/fs_dir.go +++ b/internal/fusefrontend/fs_dir.go @@ -54,7 +54,6 @@ func (fs *FS) mkdirWithIv(dirfd int, cName string, mode uint32, context *fuse.Co // // Symlink-safe through use of Mkdirat(). func (fs *FS) Mkdir(newPath string, mode uint32, context *fuse.Context) (code fuse.Status) { - defer fs.dirCache.Clear() if fs.isFiltered(newPath) { return fuse.EPERM }