From owner-svn-src-head@freebsd.org Wed Aug 15 17:41:21 2018 Return-Path: Delivered-To: svn-src-head@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 CBC9D106A240; Wed, 15 Aug 2018 17:41:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81E8270DBB; Wed, 15 Aug 2018 17:41:20 +0000 (UTC) (envelope-from cem@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 62A785AF5; Wed, 15 Aug 2018 17:41:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FHfKmT068246; Wed, 15 Aug 2018 17:41:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FHfKHu068245; Wed, 15 Aug 2018 17:41:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201808151741.w7FHfKHu068245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 15 Aug 2018 17:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337861 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 337861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:41:21 -0000 Author: cem Date: Wed Aug 15 17:41:19 2018 New Revision: 337861 URL: https://svnweb.freebsd.org/changeset/base/337861 Log: FUSE: Document global sysctl knobs So that I don't have to keep grepping around the codebase to remember what each one does. And maybe it saves someone else some time. Fix a trivial whitespace issue while here. No functional change. Sponsored by: Dell EMC Isilon Modified: head/sys/fs/fuse/fuse_node.c Modified: head/sys/fs/fuse/fuse_node.c ============================================================================== --- head/sys/fs/fuse/fuse_node.c Wed Aug 15 16:36:29 2018 (r337860) +++ head/sys/fs/fuse/fuse_node.c Wed Aug 15 17:41:19 2018 (r337861) @@ -97,37 +97,48 @@ MALLOC_DEFINE(M_FUSEVN, "fuse_vnode", "fuse vnode priv static int fuse_node_count = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, node_count, CTLFLAG_RD, - &fuse_node_count, 0, ""); + &fuse_node_count, 0, "Count of FUSE vnodes"); int fuse_data_cache_enable = 1; SYSCTL_INT(_vfs_fuse, OID_AUTO, data_cache_enable, CTLFLAG_RW, - &fuse_data_cache_enable, 0, ""); + &fuse_data_cache_enable, 0, + "enable caching of FUSE file data (including dirty data)"); int fuse_data_cache_invalidate = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, data_cache_invalidate, CTLFLAG_RW, - &fuse_data_cache_invalidate, 0, ""); + &fuse_data_cache_invalidate, 0, + "If non-zero, discard cached clean file data when there are no active file" + " users"); int fuse_mmap_enable = 1; SYSCTL_INT(_vfs_fuse, OID_AUTO, mmap_enable, CTLFLAG_RW, - &fuse_mmap_enable, 0, ""); + &fuse_mmap_enable, 0, + "If non-zero, and data_cache_enable is also non-zero, enable mmap(2) of " + "FUSE files"); int fuse_refresh_size = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, refresh_size, CTLFLAG_RW, - &fuse_refresh_size, 0, ""); + &fuse_refresh_size, 0, + "If non-zero, and no dirty file extension data is buffered, fetch file " + "size before write operations"); int fuse_sync_resize = 1; SYSCTL_INT(_vfs_fuse, OID_AUTO, sync_resize, CTLFLAG_RW, - &fuse_sync_resize, 0, ""); + &fuse_sync_resize, 0, + "If a cached write extended a file, inform FUSE filesystem of the changed" + "size immediately subsequent to the issued writes"); int fuse_fix_broken_io = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, fix_broken_io, CTLFLAG_RW, - &fuse_fix_broken_io, 0, ""); + &fuse_fix_broken_io, 0, + "If non-zero, print a diagnostic warning if a userspace filesystem returns" + " EIO on reads of recently extended portions of files"); static void fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, @@ -336,7 +347,7 @@ fuse_vnode_savesize(struct vnode *vp, struct ucred *cr fsai->valid = 0; /* Truncate to a new value. */ - fsai->size = fvdat->filesize; + fsai->size = fvdat->filesize; fsai->valid |= FATTR_SIZE; fuse_filehandle_getrw(vp, FUFH_WRONLY, &fufh);