]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add a testing facility to manually reclaim a vnode
authorasomers <asomers@FreeBSD.org>
Thu, 6 Jun 2019 15:04:50 +0000 (15:04 +0000)
committerasomers <asomers@FreeBSD.org>
Thu, 6 Jun 2019 15:04:50 +0000 (15:04 +0000)
commite0dae398511bea1d4f28e2024ea8685af159b29e
tree257f713d5dba39657140479f811aeff8c1d2d2ca
parentf6eb4393c0bd662776f98f414c2e85b936b8067f
Add a testing facility to manually reclaim a vnode

Add the debug.try_reclaim_vnode sysctl. When a pathname is written to it, it
will be reclaimed, as long as it isn't already or doomed. The purpose is to
gain test coverage for vnode reclamation, which is otherwise hard to
achieve.

Add the debug.ftry_reclaim_vnode sysctl.  It does the same thing, except
that its argument is a file descriptor instead of a pathname.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20519
sys/kern/vfs_subr.c