• Dai Ngo's avatar
    NFSD: add courteous server support for thread with only delegation · 66af2579
    Dai Ngo authored
    This patch provides courteous server support for delegation only.
    Only expired client with delegation but no conflict and no open
    or lock state is allowed to be in COURTESY state.
    
    Delegation conflict with COURTESY/EXPIRABLE client is resolved by
    setting it to EXPIRABLE, queue work for the laundromat and return
    delay to the caller. Conflict is resolved when the laudromat runs
    and expires the EXIRABLE client while the NFS client retries the
    OPEN request. Local thread request that gets conflict is doing the
    retry in _break_lease.
    
    Client in COURTESY or EXPIRABLE state is allowed to reconnect and
    continues to have access to its state. Access to the nfs4_client by
    the reconnecting thread and the laundromat is serialized via the
    client_lock.
    Reviewed-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
    Signed-off-by: default avatarDai Ngo <dai.ngo@oracle.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    66af2579
nfs4state.c 200 KB