• Jeff Layton's avatar
    nfsd: add the infrastructure to handle the cld upcall · f3f80148
    Jeff Layton authored
    ...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: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    f3f80148
nfs4recover.c 22 KB