Fixed a build error.
parent
cea0fb8b48
commit
7cddc48c24
|
@ -72,6 +72,8 @@ func NewCachingFS(
|
||||||
lookupEntryTimeout time.Duration,
|
lookupEntryTimeout time.Duration,
|
||||||
getattrTimeout time.Duration) (fs CachingFS, err error) {
|
getattrTimeout time.Duration) (fs CachingFS, err error) {
|
||||||
cfs := &cachingFS{
|
cfs := &cachingFS{
|
||||||
|
lookupEntryTimeout: lookupEntryTimeout,
|
||||||
|
getattrTimeout: getattrTimeout,
|
||||||
baseID: (fuse.RootInodeID + 1 + numInodes - 1) / numInodes,
|
baseID: (fuse.RootInodeID + 1 + numInodes - 1) / numInodes,
|
||||||
mtime: time.Now(),
|
mtime: time.Now(),
|
||||||
}
|
}
|
||||||
|
@ -93,6 +95,18 @@ const (
|
||||||
|
|
||||||
type cachingFS struct {
|
type cachingFS struct {
|
||||||
fuseutil.NotImplementedFileSystem
|
fuseutil.NotImplementedFileSystem
|
||||||
|
|
||||||
|
/////////////////////////
|
||||||
|
// Constant data
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
lookupEntryTimeout time.Duration
|
||||||
|
getattrTimeout time.Duration
|
||||||
|
|
||||||
|
/////////////////////////
|
||||||
|
// Mutable state
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
mu syncutil.InvariantMutex
|
mu syncutil.InvariantMutex
|
||||||
|
|
||||||
// The current ID of the lowest numbered non-root inode.
|
// The current ID of the lowest numbered non-root inode.
|
||||||
|
@ -250,7 +264,7 @@ func (fs *cachingFS) LookUpInode(
|
||||||
// Fill in the response.
|
// Fill in the response.
|
||||||
resp.Entry.Child = id
|
resp.Entry.Child = id
|
||||||
resp.Entry.Attributes = attrs
|
resp.Entry.Attributes = attrs
|
||||||
resp.Entry.EntryExpiration = fs.entryExpiration
|
resp.Entry.EntryExpiration = time.Now().Add(fs.lookupEntryTimeout)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue