Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 20:31:10 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r347550 - in projects/fuse2: . sys/fs/fuse
Message-ID:  <201905132031.x4DKVAPZ009332@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon May 13 20:31:10 2019
New Revision: 347550
URL: https://svnweb.freebsd.org/changeset/base/347550

Log:
  fusefs: remove the vfs.fusefs.refresh_size sysctl
  
  This was added > 6.5 years ago with no evident reason why.  It probably had
  something to do with the incomplete cached attribute implementation.  But
  cache attributes work now.  I see no reason to retain this sysctl.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/UPDATING
  projects/fuse2/sys/fs/fuse/fuse_node.c

Modified: projects/fuse2/UPDATING
==============================================================================
--- projects/fuse2/UPDATING	Mon May 13 20:17:55 2019	(r347549)
+++ projects/fuse2/UPDATING	Mon May 13 20:31:10 2019	(r347550)
@@ -37,9 +37,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
 	been removed from mount_fusefs(8).  You can safely remove them from
 	your scripts, because they had no effect.
 
-	The vfs.fusefs.fix_broken_io and vfs.fusefs.sync_resize sysctls have
-	been removed.  If you felt the need to set either to a non-default
-	value, please tell asomers@FreeBSD.org why.
+	The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize, and
+	vfs.fusefs.refresh_size 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_node.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_node.c	Mon May 13 20:17:55 2019	(r347549)
+++ projects/fuse2/sys/fs/fuse/fuse_node.c	Mon May 13 20:31:10 2019	(r347550)
@@ -128,13 +128,6 @@ SYSCTL_INT(_vfs_fusefs, OID_AUTO, mmap_enable, CTLFLAG
     "If non-zero, and data_cache_mode is also non-zero, enable mmap(2) of "
     "FUSE files");
 
-int	fuse_refresh_size = 0;
-
-SYSCTL_INT(_vfs_fusefs, OID_AUTO, refresh_size, CTLFLAG_RW,
-    &fuse_refresh_size, 0,
-    "If non-zero, and no dirty file extension data is buffered, fetch file "
-    "size before write operations");
-
 static int
 sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
 {
@@ -409,9 +402,14 @@ fuse_vnode_refreshsize(struct vnode *vp, struct ucred 
 
 	if ((fvdat->flag & FN_SIZECHANGE) != 0 ||
 	    fuse_data_cache_mode == FUSE_CACHE_UC ||
-	    (fuse_refresh_size == 0 && fvdat->filesize != 0))
+	    fvdat->filesize != 0)
 		return 0;
 
+	/*
+	 * TODO: replace VOP_GETATTR with fuse_internal_getattr to use the
+	 * cached attributes.  Better yet, replace fvdat->filesize with
+	 * attrs->va_size
+	 */
 	err = VOP_GETATTR(vp, &va, cred);
 	SDT_PROBE2(fusefs, , node, trace, 1, "refreshed file size");
 	return err;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905132031.x4DKVAPZ009332>