• J. Bruce Fields's avatar
    nfsd4: look up stateid's per clientid · 38c2f4b1
    J. Bruce Fields authored
    Use a separate stateid idr per client, and lookup a stateid by first
    finding the client, then looking up the stateid relative to that client.
    
    Also some minor refactoring.
    
    This allows us to improve error returns: we can return expired when the
    clientid is not found and bad_stateid when the clientid is found but not
    the stateid, as opposed to returning expired for both cases.
    
    I hope this will also help to replace the state lock mostly by a
    per-client lock, but that hasn't been done yet.
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    38c2f4b1
state.h 16.1 KB