From owner-svn-src-projects@freebsd.org Mon May 13 20:57:23 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F050159AF02 for ; Mon, 13 May 2019 20:57:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26EDE6E44B; Mon, 13 May 2019 20:57:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C0C5F440; Mon, 13 May 2019 20:57:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4DKvMSK024578; Mon, 13 May 2019 20:57:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4DKvL1V024574; Mon, 13 May 2019 20:57:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201905132057.x4DKvL1V024574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 13 May 2019 20:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r347552 - in projects/fuse2: . sys/fs/fuse X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in projects/fuse2: . sys/fs/fuse X-SVN-Commit-Revision: 347552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26EDE6E44B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2019 20:57:23 -0000 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);