Commit 968b5dd7 authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed an ID allocation bug.

parent bac78088
......@@ -72,10 +72,14 @@ type CachingFS interface {
func NewCachingFS(
lookupEntryTimeout time.Duration,
getattrTimeout time.Duration) (fs CachingFS, err error) {
roundUp := func(n fuse.InodeID) fuse.InodeID {
return numInodes * ((n + numInodes - 1) / numInodes)
}
cfs := &cachingFS{
lookupEntryTimeout: lookupEntryTimeout,
getattrTimeout: getattrTimeout,
baseID: (fuse.RootInodeID + 1 + numInodes - 1) / numInodes,
baseID: roundUp(fuse.RootInodeID + 1),
mtime: time.Now(),
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment