summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-16 07:35:06 +0000
committerphk <phk@FreeBSD.org>2005-03-16 07:35:06 +0000
commite61634909a711e4dc62a5b7c64acc1ddabc9c351 (patch)
tree2a5ad25ecb42bea9ee693b1e0d5f739148d0b162 /sys/kern/vfs_mount.c
parenteeb2c527c0ecb4fc525ae4af75f02284359c1a3a (diff)
downloadFreeBSD-src-e61634909a711e4dc62a5b7c64acc1ddabc9c351.zip
FreeBSD-src-e61634909a711e4dc62a5b7c64acc1ddabc9c351.tar.gz
Add mnt_hashseed to struct mount and initialize it witn PRNG bits, use
it to get better hashing in vfs_hash. In case of an insert collision in vfs_hash_insert(), put the loosing vnode on a special list so that vfs_hash_remove() can just assume that it is on a list. Drop the VI_HASHED flag.
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 94e2715..7930386 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -428,6 +428,7 @@ vfs_mount_alloc(struct vnode *vp, struct vfsconf *vfsp,
mac_init_mount(mp);
mac_create_mount(td->td_ucred, mp);
#endif
+ arc4rand(&mp->mnt_hashseed, sizeof mp->mnt_hashseed, 0);
*mpp = mp;
return (0);
}
OpenPOWER on IntegriCloud