fusefs: remove the vfs.fusefs.data_cache_invalidate sysctl

This sysctl was added > 6.5 years ago and I don't know why.  The description
seems at odds with the code.  While it's supposed to "discard clean cached
data" during VOP_INACTIVE, it looks like it would discard any cached data,
clean or otherwise.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Alan Somers 2019-05-13 20:57:21 +00:00
parent fcefa6ef66
commit 5940f822ae
4 changed files with 5 additions and 13 deletions

View File

@ -38,9 +38,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
your scripts, because they had no effect.
The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize,
vfs.fusefs.refresh_size, and vfs.fusefs.mmap_enable sysctls have been
removed. If you felt the need to set any of them to a non-default
value, please tell asomers@FreeBSD.org why.
vfs.fusefs.refresh_size, vfs.fusefs.mmap_enable, and
vfs.fusefs.data_cache_invalidate sysctls have been removed. If you
felt the need to set any of them to a non-default value, please tell
asomers@FreeBSD.org why.
20190507:
The IPSEC option has been removed from GENERIC. Users requiring

View File

@ -229,7 +229,6 @@ enum fuse_data_cache_mode {
};
extern int fuse_data_cache_mode;
extern int fuse_data_cache_invalidate;
static inline struct fuse_data *
fuse_get_mpdata(struct mount *mp)

View File

@ -114,13 +114,6 @@ SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, CTLTYPE_INT|CTLFLAG_RW,
"Zero: disable caching of FUSE file data; One: write-through caching "
"(default); Two: write-back caching (generally unsafe)");
int fuse_data_cache_invalidate = 0;
SYSCTL_INT(_vfs_fusefs, OID_AUTO, data_cache_invalidate, CTLFLAG_RW,
&fuse_data_cache_invalidate, 0,
"If non-zero, discard cached clean file data when there are no active file"
" users");
static int
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
{

View File

@ -762,8 +762,7 @@ fuse_vnop_inactive(struct vop_inactive_args *ap)
if ((VTOFUD(vp)->flag & FN_SIZECHANGE) != 0) {
fuse_vnode_savesize(vp, NULL, 0);
}
if (fuse_data_cache_invalidate ||
(fvdat->flag & FN_REVOKED) != 0)
if ((fvdat->flag & FN_REVOKED) != 0)
fuse_io_invalbuf(vp, td);
else
fuse_io_flushbuf(vp, MNT_WAIT, td);