]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: prealloc vnodes in getnewvnode_reserve
authormjg <mjg@FreeBSD.org>
Sat, 11 Jan 2020 22:58:14 +0000 (22:58 +0000)
committermjg <mjg@FreeBSD.org>
Sat, 11 Jan 2020 22:58:14 +0000 (22:58 +0000)
commitd9c6cac9c348b207bf8410ce7c309010592c0291
tree1e466c22d4704fa12b10f94e62d3259c3d059510
parent85edb793f694ee4f4e7915a96b08de790f3cd8b1
vfs: prealloc vnodes in getnewvnode_reserve

Having a reserved vnode count does not guarantee that getnewvnodes wont
block later. Said blocking partially defeats the purpose of reserving in
the first place.

Preallocate instaed. The only consumer was always passing "1" as count
and never nesting reservations.
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
sys/kern/kern_thread.c
sys/kern/subr_trap.c
sys/kern/vfs_subr.c
sys/sys/proc.h
sys/sys/vnode.h