From 0f8d3318a321bf19f92e0872d741266cd0431463 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 24 Nov 2016 22:36:04 +0100 Subject: main, fusefrontend: add "-noprealloc" option Preallocation is very slow on hdds that run btrfs. Give the user the option to disable it. This greatly speeds up small file operations but reduces the robustness against out-of-space errors. Also add the option to the man page. More info: https://github.com/rfjakob/gocryptfs/issues/63 --- internal/fusefrontend/fs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/fusefrontend/fs.go') diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index e9e6113..f41e9a7 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -106,7 +106,7 @@ func (fs *FS) Open(path string, flags uint32, context *fuse.Context) (fuseFile n return nil, fuse.ToStatus(err) } - return NewFile(f, writeOnly, fs.contentEnc) + return NewFile(f, writeOnly, fs) } // Create implements pathfs.Filesystem. @@ -160,7 +160,7 @@ func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Conte tlog.Warn.Printf("Create: Chown failed: %v", err) } } - return NewFile(fd, writeOnly, fs.contentEnc) + return NewFile(fd, writeOnly, fs) } // Chmod implements pathfs.Filesystem. -- cgit v1.2.3