• Scott Mayhew's avatar
    nfsd: un-deprecate nfsdcld · 74725959
    Scott Mayhew authored
    When nfsdcld was released, it was quickly deprecated in favor of the
    nfsdcltrack usermodehelper, so as to not require another running daemon.
    That prevents NFSv4 clients from reclaiming locks from nfsd's running in
    containers, since neither nfsdcltrack nor the legacy client tracking
    code work in containers.
    
    This commit un-deprecates the use of nfsdcld, with one twist: we will
    populate the reclaim_str_hashtbl on startup.
    
    During client tracking initialization, do an upcall ("GraceStart") to
    nfsdcld to get a list of clients from the database.  nfsdcld will do
    one downcall with a status of -EINPROGRESS for each client record in
    the database, which in turn will cause an nfs4_client_reclaim to be
    added to the reclaim_str_hashtbl.  When complete, nfsdcld will do a
    final downcall with a status of 0.
    
    This will save nfsd from having to do an upcall to the daemon during
    nfs4_check_open_reclaim() processing.
    
    Even though nfsdcld was quickly deprecated, there is a very small chance
    of old nfsdcld daemons running in the wild.  These will respond to the
    new "GraceStart" upcall with -EOPNOTSUPP, in which case we will log a
    message and fall back to the original nfsdcld tracking ops (now called
    nfsd4_cld_tracking_ops_v0).
    Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    74725959
nfs4recover.c 41.7 KB