On Sun, 17 Aug 2014 09:11:56 -0400 Tejun Heo <tj@xxxxxxxxxx> wrote: > Hello, Neil. > > On Wed, Aug 13, 2014 at 02:08:31PM +1000, NeilBrown wrote: > > There are two interesting requirements for the manager thread: > > 1/ It must allow SIGKILL, which can abort NFS transactions to > > a dead server. > > 2/ It may continue running after the filesystem is unmounted, > > until the server recovers or the thread is SIGKILLed > > Out of curiosity, why is SIGKILL handling necessary at all? Can't nfs > just keep the manager running while any mount is active? It does. The manage will even continue after there are no mounts active if it is blocked on a non-responding server. If there is an outstanding RPC request to a non-responsive server then the only way to abort that request is to send SIGKILL to the thread which is waiting for the request. So if we want things to clean up properly on shutdown it seems best for a sigkill to be able to abort that thread. It is quite likely that a deep re-write of various details could simplify this. There seems little point in the manager continuing after the lease timeout has expired for example. So there could be better ways to clean up. However I think we probably do want the state manager to continue trying at least until the lease time expires, so we cannot clean up the thread at unmount time - it needs to persist at least a little while. It is also possible that I'm missing some important details. I really just wanted to avoid the possible memory deadlock without breaking anything that I didn't completely understand.. The proposed patch is the best I could do. Thanks, NeilBrown
Attachment:
signature.asc
Description: PGP signature