• J. Bruce Fields's avatar
    nfsd: hash nfs4_files by inode number · f9b60e22
    J. Bruce Fields authored
    The nfs4_file structure is per-filehandle, not per-inode, because the
    spec requires open and other state to be per filehandle.
    
    But it will turn out to be convenient for nfs4_files associated with the
    same inode to be hashed to the same bucket, so let's hash on the inode
    instead of the filehandle.
    
    Filehandle aliasing is rare, so that shouldn't have much performance
    impact.
    
    (If you have a ton of exported filesystems, though, and all of them have
    a root with inode number 2, could that get you an overlong hash chain?
    Perhaps this (and the v4 open file cache) should be hashed on the inode
    pointer instead.)
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    f9b60e22
nfs4state.c 193 KB