From 439fea92c22f61bfe1a17617da6fbaf969063640 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 20 Mar 2001 02:10:18 +0000 Subject: 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. --- sys/nfsclient/nfs_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/nfsclient/nfs_node.c') 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 || -- cgit v1.2.3