go-nfs icon indicating copy to clipboard operation
go-nfs copied to clipboard

Added helpers/persistenthandler

Open ReallyLiri opened this issue 4 years ago • 3 comments

persistent store is backed by github.com/dgraph-io/badger and is not limited in size

ReallyLiri avatar Mar 20 '21 16:03 ReallyLiri

This highlights an aspect of the Handler interface that I'm going to see if I can take a quick pass at improving. Currently Handlers receive a Mount request as a new client connects to the server, but don't have a way to see the subsequent Unmount. In this case, it would be useful to keep track of handles in relation to the associated Mount so that they can be freed once the client Unmount's. Tagging the client can be done by wrapping the billy.Filesystem with an additional struct, but there's currently no way for this handler to know when it's safe to discard handles.

willscott avatar Mar 20 '21 16:03 willscott

Added the unmount handler method in https://github.com/willscott/go-nfs/pull/28. I'll take a pass at making use of that for freeing handles in this PR later.

willscott avatar Mar 20 '21 16:03 willscott

Seems to need rebase

AkihiroSuda avatar Sep 22 '21 14:09 AkihiroSuda