• Marc Eshel's avatar
    nfsd41: sessionid hashing · 5282fd72
    Marc Eshel authored
    Simple sessionid hashing using its monotonically increasing sequence number.
    
    Locking considerations:
    sessionid_hashtbl access is controlled by the sessionid_lock spin lock.
    It must be taken for insert, delete, and lookup.
    nfsd4_sequence looks up the session id and if the session is found,
    it calls nfsd4_get_session (still under the sessionid_lock).
    nfsd4_destroy_session calls nfsd4_put_session after unhashing
    it, so when the session's kref reaches zero it's going to get freed.
    Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
    [we don't use a prime for sessionid hash table size]
    [use sessionid_lock spin lock]
    Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    5282fd72
nfs4state.c 89.2 KB