nfsd: add the infrastructure to handle the cld upcall
authorJeff Layton <jlayton@redhat.com>
Wed, 21 Mar 2012 13:52:07 +0000 (09:52 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 26 Mar 2012 15:49:48 +0000 (11:49 -0400)
commitf3f8014862d813cca81a597c83bd1dbf0fb2b8f6
treef9d41fd42d38690d3f8e9e70a3542928706065c7
parent0ab628d856a63d63b47307b09851d1e955c706ac
nfsd: add the infrastructure to handle the cld upcall

...and add a mechanism for switching between the "legacy" tracker and
the new one. The decision is made by looking to see whether the
v4recoverydir exists. If it does, then the legacy client tracker is
used.

If it's not, then the kernel will create a "cld" pipe in rpc_pipefs.
That pipe is used to talk to a daemon for handling the upcall.

Most of the data structures for the new client tracker are handled on a
per-namespace basis, so this upcall should be essentially ready for
containerization. For now however, nfsd just starts it by calling the
initialization and exit functions for init_net.

I'm making the assumption that at some point in the future we'll be able
to determine the net namespace from the nfs4_client. Until then, this
patch hardcodes init_net in those places. I've sprinkled some "FIXME"
comments around that code to attempt to make it clear where we'll need
to fix that up later.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4recover.c