diff options
author | Jakob Unterwurzacher | 2021-08-30 09:39:57 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-08-30 09:41:38 +0200 |
commit | b83ca9c921019fc3b790dabb6198bb77ef2f9a34 (patch) | |
tree | 28a66f76f73e67819bc120274b36c09676ab369c /internal/fusefrontend/file.go | |
parent | e69a85769f008a33119eda85d3face948afe7636 (diff) |
Remove serialize_reads package
Will be replaced by go-fuse's new SyncRead flag.
More info: https://github.com/hanwen/go-fuse/issues/395
SyncRead commit: https://github.com/hanwen/go-fuse/commit/15a8bb029a4e1a51e10043c370970596b1fbb737
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r-- | internal/fusefrontend/file.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 9481abf..6f33a60 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -20,7 +20,6 @@ import ( "github.com/rfjakob/gocryptfs/v2/internal/contentenc" "github.com/rfjakob/gocryptfs/v2/internal/inomap" "github.com/rfjakob/gocryptfs/v2/internal/openfiletable" - "github.com/rfjakob/gocryptfs/v2/internal/serialize_reads" "github.com/rfjakob/gocryptfs/v2/internal/stupidgcm" "github.com/rfjakob/gocryptfs/v2/internal/syscallcompat" "github.com/rfjakob/gocryptfs/v2/internal/tlog" @@ -252,13 +251,7 @@ func (f *File) Read(ctx context.Context, buf []byte, off int64) (resultData fuse defer f.fileTableEntry.ContentLock.RUnlock() tlog.Debug.Printf("ino%d: FUSE Read: offset=%d length=%d", f.qIno.Ino, off, len(buf)) - if f.rootNode.args.SerializeReads { - serialize_reads.Wait(off, len(buf)) - } out, errno := f.doRead(buf[:0], uint64(off), uint64(len(buf))) - if f.rootNode.args.SerializeReads { - serialize_reads.Done() - } if errno != 0 { return nil, errno } @@ -389,6 +382,7 @@ func (f *File) Write(ctx context.Context, data []byte, off int64) (uint32, sysca // But if the write directly follows an earlier write, it cannot create a // hole, and we can save one Stat() call. if !f.isConsecutiveWrite(off) { + fmt.Printf("isConsecutiveWrite=false, off=%d\n", off) errno := f.writePadHole(off) if errno != 0 { return 0, errno |