logfs opened files

This commit is contained in:
royalcat 2024-06-19 00:17:10 +03:00
parent bf2dac5cf1
commit 2d72790c1a
4 changed files with 42 additions and 11 deletions
src/export/nfs

View file

@ -154,8 +154,7 @@ func (c *CachingHandler) InvalidateHandle(ctx context.Context, fs nfs.Filesystem
return c.activeHandles.Delete(ctx, id)
}
// const maxInt = int(^uint(0) >> 1)
const maxHandlers = 8129
const maxHandlers = int(^uint(0) >> 1)
// HandleLimit exports how many file handles can be safely stored by this cache.
func (c *CachingHandler) HandleLimit() int {