Date: Mon, 13 May 2019 20:57:21 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r347552 - in projects/fuse2: . sys/fs/fuse Message-ID: <201905132057.x4DKvL1V024574@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Mon May 13 20:57:21 2019 New Revision: 347552 URL: https://svnweb.freebsd.org/changeset/base/347552 Log: 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 Modified: projects/fuse2/UPDATING projects/fuse2/sys/fs/fuse/fuse_ipc.h projects/fuse2/sys/fs/fuse/fuse_node.c projects/fuse2/sys/fs/fuse/fuse_vnops.c Modified: projects/fuse2/UPDATING ============================================================================== --- projects/fuse2/UPDATING Mon May 13 20:42:09 2019 (r347551) +++ projects/fuse2/UPDATING Mon May 13 20:57:21 2019 (r347552) @@ -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 Modified: projects/fuse2/sys/fs/fuse/fuse_ipc.h ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_ipc.h Mon May 13 20:42:09 2019 (r347551) +++ projects/fuse2/sys/fs/fuse/fuse_ipc.h Mon May 13 20:57:21 2019 (r347552) @@ -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) Modified: projects/fuse2/sys/fs/fuse/fuse_node.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_node.c Mon May 13 20:42:09 2019 (r347551) +++ projects/fuse2/sys/fs/fuse/fuse_node.c Mon May 13 20:57:21 2019 (r347552) @@ -114,13 +114,6 @@ SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, CT "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) { Modified: projects/fuse2/sys/fs/fuse/fuse_vnops.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_vnops.c Mon May 13 20:42:09 2019 (r347551) +++ projects/fuse2/sys/fs/fuse/fuse_vnops.c Mon May 13 20:57:21 2019 (r347552) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905132057.x4DKvL1V024574>