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:
parent
fcefa6ef66
commit
5940f822ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=347552
7
UPDATING
7
UPDATING
@ -38,9 +38,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
|
|||||||
your scripts, because they had no effect.
|
your scripts, because they had no effect.
|
||||||
|
|
||||||
The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize,
|
The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize,
|
||||||
vfs.fusefs.refresh_size, and vfs.fusefs.mmap_enable sysctls have been
|
vfs.fusefs.refresh_size, vfs.fusefs.mmap_enable, and
|
||||||
removed. If you felt the need to set any of them to a non-default
|
vfs.fusefs.data_cache_invalidate sysctls have been removed. If you
|
||||||
value, please tell asomers@FreeBSD.org why.
|
felt the need to set any of them to a non-default value, please tell
|
||||||
|
asomers@FreeBSD.org why.
|
||||||
|
|
||||||
20190507:
|
20190507:
|
||||||
The IPSEC option has been removed from GENERIC. Users requiring
|
The IPSEC option has been removed from GENERIC. Users requiring
|
||||||
|
@ -229,7 +229,6 @@ enum fuse_data_cache_mode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern int fuse_data_cache_mode;
|
extern int fuse_data_cache_mode;
|
||||||
extern int fuse_data_cache_invalidate;
|
|
||||||
|
|
||||||
static inline struct fuse_data *
|
static inline struct fuse_data *
|
||||||
fuse_get_mpdata(struct mount *mp)
|
fuse_get_mpdata(struct mount *mp)
|
||||||
|
@ -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 "
|
"Zero: disable caching of FUSE file data; One: write-through caching "
|
||||||
"(default); Two: write-back caching (generally unsafe)");
|
"(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
|
static int
|
||||||
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
|
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
|
||||||
{
|
{
|
||||||
|
@ -762,8 +762,7 @@ fuse_vnop_inactive(struct vop_inactive_args *ap)
|
|||||||
if ((VTOFUD(vp)->flag & FN_SIZECHANGE) != 0) {
|
if ((VTOFUD(vp)->flag & FN_SIZECHANGE) != 0) {
|
||||||
fuse_vnode_savesize(vp, NULL, 0);
|
fuse_vnode_savesize(vp, NULL, 0);
|
||||||
}
|
}
|
||||||
if (fuse_data_cache_invalidate ||
|
if ((fvdat->flag & FN_REVOKED) != 0)
|
||||||
(fvdat->flag & FN_REVOKED) != 0)
|
|
||||||
fuse_io_invalbuf(vp, td);
|
fuse_io_invalbuf(vp, td);
|
||||||
else
|
else
|
||||||
fuse_io_flushbuf(vp, MNT_WAIT, td);
|
fuse_io_flushbuf(vp, MNT_WAIT, td);
|
||||||
|
Loading…
Reference in New Issue
Block a user