diff options
author | Peter Wemm <peter@FreeBSD.org> | 2001-03-20 02:10:18 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2001-03-20 02:10:18 +0000 |
commit | 439fea92c22f61bfe1a17617da6fbaf969063640 (patch) | |
tree | 83cc20359e6f55ec2e9348003e788ee00688fb9e /sys/nfsclient/nfs_node.c | |
parent | e0fbb1d2de5da5201d80ec05cf2aee2d90e3f1b0 (diff) | |
download | src-439fea92c22f61bfe1a17617da6fbaf969063640.tar.gz src-439fea92c22f61bfe1a17617da6fbaf969063640.zip |
Use the same API as the example code.
Allow the initial hash value to be passed in, as the examples do.
Incrementally hash in the dvp->v_id (using the official api) rather than
add it. This seems to help power-of-two predictable filename trees
where the filenames repeat on a power-of-two cycle and the directory trees
have power-of-two components in it. The simple add then mask was causing
things like 12000+ entry collision chains while most other entries have
between 0 and 3 entries each. This way seems to improve things.
Notes
Notes:
svn path=/head/; revision=74501
Diffstat (limited to 'sys/nfsclient/nfs_node.c')
-rw-r--r-- | sys/nfsclient/nfs_node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 450729d97754..a82ad11ffce1 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -107,7 +107,7 @@ nfs_nget(mntp, fhp, fhsize, npp) rsflags = 0; retry: - nhpp = NFSNOHASH(fnv32_hashbuf(fhp->fh_bytes, fhsize)); + nhpp = NFSNOHASH(fnv_32_buf(fhp->fh_bytes, fhsize, FNV1_32_INIT)); loop: for (np = nhpp->lh_first; np != 0; np = np->n_hash.le_next) { if (mntp != NFSTOV(np)->v_mount || np->n_fhsize != fhsize || |