diff options
author | peter <peter@FreeBSD.org> | 2001-03-20 02:10:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-03-20 02:10:18 +0000 |
commit | 266cea85ee85a1343c8d97993dc1f12fadb5db16 (patch) | |
tree | 4495c0a2e78047767d7f26e6af5e514fa392252f /sys/nfs/nfs_node.c | |
parent | e1c06db9614adac5dbc0db3be048e6d3bb916b61 (diff) | |
download | FreeBSD-src-266cea85ee85a1343c8d97993dc1f12fadb5db16.zip FreeBSD-src-266cea85ee85a1343c8d97993dc1f12fadb5db16.tar.gz |
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.
Diffstat (limited to 'sys/nfs/nfs_node.c')
-rw-r--r-- | sys/nfs/nfs_node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 450729d..a82ad11 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/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 || |