• Neil Brown's avatar
    [PATCH] kNFSd: NFSv4 open share state patch · 448d25b8
    Neil Brown authored
    From: "William A.(Andy) Adamson" <andros@citi.umich.edu>
    
    
    this open share state patch creates all the structures and hash tables needed
    to create and destroy share state on OPEN.
    
    a struct nfs4_stateowner is introduced. this is currently only used for share
    state, but will also be used as an anchor for byte-range lock state. e.g. it
    will be either an (open)stateowner or a (lock)stateower.
    
    a struct nfs4_stateid is introduced with holds stateid info for openfiles per
    (open)stateowner. this struct will also hold byte-range lock info for
    (lock)stateowners.
    
    ownerstr_hashtbl[] holds nfs4_stateowners hashed by the nfs4_open owner and
    clientid, and is used to lookup nfs4_stateowners on OPEN.
    
    a struct nfs4_file is introduced which holds info on open files with state.
    
    file_hashtbl[] holds nfs4_files, and is used to find a file in order to search
    for conflicting share locks on OPEN. delegation info will hang off the
    nf4_file struct.
    
    i moved nfsd4_process_open1() into nfs4state.c, and added nfs4_process_open2()
    there as well
    
    i've left lease management, state reclaim, and the special replay management
    on sequenceid mutating operations like OPEN for subsequent patches.
    448d25b8
nfsctl.c 11.3 KB