Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150213529
D44218.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
975 B
Referenced Files
None
Subscribers
None
D44218.id.diff
View Options
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -50,6 +50,7 @@
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
+#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/jail.h>
@@ -67,6 +68,12 @@
static vfs_vget_t nullfs_vget;
static vfs_extattrctl_t nullfs_extattrctl;
+SYSCTL_NODE(_vfs, OID_AUTO, nullfs, CTLFLAG_RW, 0, "nullfs");
+
+static bool null_cache_vnodes = true;
+SYSCTL_BOOL(_vfs_nullfs, OID_AUTO, cache_vnodes, CTLFLAG_RW,
+ &null_cache_vnodes, 0, "cache free nullfs vnodes");
+
/*
* Mount null layer
*/
@@ -195,7 +202,8 @@
}
xmp->nullm_flags |= NULLM_CACHE;
- if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 ||
+ if (!null_cache_vnodes ||
+ vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 ||
(xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0)
xmp->nullm_flags &= ~NULLM_CACHE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 31, 7:46 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30607110
Default Alt Text
D44218.id.diff (975 B)
Attached To
Mode
D44218: kern/nullfs: Add the sysctl to control the vnode caching upon mounting nullfs. (stable/13)
Attached
Detach File
Event Timeline
Log In to Comment