aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/fuse/fuse_vfsops.c
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2020-05-22 18:03:14 +0000
committerAlan Somers <asomers@FreeBSD.org>2020-05-22 18:03:14 +0000
commit7096c29e5bf255a6bc308bcf028f38c12c5243fe (patch)
tree72cf0dbd42f3c6f4cfa62d17aa6a3267696a2d09 /sys/fs/fuse/fuse_vfsops.c
parentc8ad15b6ff8803d886f31289ea4df826b472918b (diff)
Disable nullfs cacheing on top of fusefs
Nullfs cacheing can keep a large number of vnodes active. That results in more active FUSE file handles, causing some FUSE servers to use extra resources. Disable nullfs cacheing for fusefs, just like we already do for NFSv4. PR: 245688 Reported by: MooseFS FreeBSD Team <freebsd@moosefs.pro> MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=361399
Diffstat (limited to 'sys/fs/fuse/fuse_vfsops.c')
-rw-r--r--sys/fs/fuse/fuse_vfsops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c
index a4c21c5c5a45..484a0da216e2 100644
--- a/sys/fs/fuse/fuse_vfsops.c
+++ b/sys/fs/fuse/fuse_vfsops.c
@@ -425,6 +425,11 @@ fuse_vfsop_mount(struct mount *mp)
*/
mp->mnt_flag &= ~MNT_LOCAL;
mp->mnt_kern_flag |= MNTK_USES_BCACHE;
+ /*
+ * Disable nullfs cacheing because it can consume too many resources in
+ * the FUSE server.
+ */
+ mp->mnt_kern_flag |= MNTK_NULL_NOCACHE;
MNT_IUNLOCK(mp);
/* We need this here as this slot is used by getnewvnode() */
mp->mnt_stat.f_iosize = maxbcachebuf;