From 488111ce390218806fca933b89279b766f7ff49c Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 12 Apr 2020 17:15:03 +0200 Subject: inomap: split into separate package inomap will also be used by fusefrontend_reverse in the future. Split if off openfiletable to make it independent. --- internal/fusefrontend/fs.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/fusefrontend/fs.go') diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index d03fc77..cfd17e3 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -18,8 +18,8 @@ import ( "github.com/rfjakob/gocryptfs/internal/configfile" "github.com/rfjakob/gocryptfs/internal/contentenc" + "github.com/rfjakob/gocryptfs/internal/inomap" "github.com/rfjakob/gocryptfs/internal/nametransform" - "github.com/rfjakob/gocryptfs/internal/openfiletable" "github.com/rfjakob/gocryptfs/internal/serialize_reads" "github.com/rfjakob/gocryptfs/internal/syscallcompat" "github.com/rfjakob/gocryptfs/internal/tlog" @@ -59,9 +59,9 @@ type FS struct { IsIdle uint32 // dirCache caches directory fds dirCache dirCacheStruct - // inumMap translates inode numbers from different devices to unique inode + // inoMap translates inode numbers from different devices to unique inode // numbers. - inumMap *openfiletable.InumMap + inoMap *inomap.InoMap } //var _ pathfs.FileSystem = &FS{} // Verify that interface is implemented. @@ -85,7 +85,7 @@ func NewFS(args Args, c *contentenc.ContentEnc, n nametransform.NameTransformer) args: args, nameTransform: n, contentEnc: c, - inumMap: openfiletable.NewInumMap(uint64(st.Dev)), // cast is needed for Darwin + inoMap: inomap.New(uint64(st.Dev)), // cast is needed for Darwin } } @@ -109,7 +109,7 @@ func (fs *FS) GetAttr(relPath string, context *fuse.Context) (*fuse.Attr, fuse.S } a := &fuse.Attr{} st2 := syscallcompat.Unix2syscall(st) - fs.inumMap.TranslateStat(&st2) + fs.inoMap.TranslateStat(&st2) a.FromStat(&st2) if a.IsRegular() { a.Size = fs.contentEnc.CipherSizeToPlainSize(a.Size) -- cgit v1.2.3