summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs/null_subr.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-01-03 19:17:57 +0000
committerkib <kib@FreeBSD.org>2013-01-03 19:17:57 +0000
commita7c71037dff32d49d32466102682ea2390f8d3a2 (patch)
treeb40d81bb8b27a27e533ff513285113179bcc22d8 /sys/fs/nullfs/null_subr.c
parent5a9188f8d3a59199c437c0e2eec747d7e9227d77 (diff)
downloadFreeBSD-src-a7c71037dff32d49d32466102682ea2390f8d3a2.zip
FreeBSD-src-a7c71037dff32d49d32466102682ea2390f8d3a2.tar.gz
Add the "nocache" nullfs mount option, which disables the caching of
the free nullfs vnodes, switching nullfs behaviour to pre-r240285. The option is mostly intended as the last-resort when higher pressure on the vnode cache due to doubling of the vnode counts is not desirable. Note that disabling the cache costs more than 2x wall time in the metadata-hungry scenarious. The default is "cache". Tested and benchmarked by: pho (previous version) MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nullfs/null_subr.c')
-rw-r--r--sys/fs/nullfs/null_subr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index b2c7a75..f82d738 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -224,6 +224,9 @@ null_nodeget(mp, lowervp, vpp)
* provide ready to use vnode.
*/
if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) {
+ KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) == 0,
+ ("lowervp %p is not excl locked and cache is disabled",
+ lowervp));
vn_lock(lowervp, LK_UPGRADE | LK_RETRY);
if ((lowervp->v_iflag & VI_DOOMED) != 0) {
vput(lowervp);
OpenPOWER on IntegriCloud