diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-10-22 21:38:56 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-10-22 21:38:56 +0000 |
commit | b7d601dc3a6d6bf34e079e05898cf7ec033754f4 (patch) | |
tree | 6bcf706fc494c38580fb595e7079999ee9c1e992 /sys/fs/nfs/nfsdport.h | |
parent | 122f9e5a0728bd17ab2583baf26e86f188d1ee2b (diff) | |
download | FreeBSD-src-b7d601dc3a6d6bf34e079e05898cf7ec033754f4.zip FreeBSD-src-b7d601dc3a6d6bf34e079e05898cf7ec033754f4.tar.gz |
Modify the file handle hash function in the experimental NFS
server so that it will work better for non-UFS file systems.
The new function simply sums the bytes of the fh_fid field
of fhandle_t.
MFC after: 10 days
Diffstat (limited to 'sys/fs/nfs/nfsdport.h')
-rw-r--r-- | sys/fs/nfs/nfsdport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfs/nfsdport.h b/sys/fs/nfs/nfsdport.h index fdba916..4888866 100644 --- a/sys/fs/nfs/nfsdport.h +++ b/sys/fs/nfs/nfsdport.h @@ -73,7 +73,7 @@ struct nfsexstuff { bcmp(&(f1)->fh_fid, &(f2)->fh_fid, sizeof(struct fid)) == 0) #define NFSLOCKHASH(f) \ - (&nfslockhash[(*((u_int32_t *)((f)->fh_fid.fid_data))) % NFSLOCKHASHSIZE]) + (&nfslockhash[nfsrv_hashfh(f) % NFSLOCKHASHSIZE]) #define NFSFPVNODE(f) ((struct vnode *)((f)->f_data)) #define NFSFPCRED(f) ((f)->f_cred) |