diff options
author | phk <phk@FreeBSD.org> | 2005-03-16 07:35:06 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-03-16 07:35:06 +0000 |
commit | e61634909a711e4dc62a5b7c64acc1ddabc9c351 (patch) | |
tree | 2a5ad25ecb42bea9ee693b1e0d5f739148d0b162 /sys/kern/vfs_mount.c | |
parent | eeb2c527c0ecb4fc525ae4af75f02284359c1a3a (diff) | |
download | FreeBSD-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.c | 1 |
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); } |