Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 19:03:46 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r347544 - in projects/fuse2: . sbin/mount_fusefs share/man/man5 sys/fs/fuse
Message-ID:  <201905131903.x4DJ3koL064957@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon May 13 19:03:46 2019
New Revision: 347544
URL: https://svnweb.freebsd.org/changeset/base/347544

Log:
  fusefs: reap dead sysctls
  
  Remove the "sync_unmount" and "init_backgrounded" sysctls and the associated
  options from mount_fusefs.  Add no backwards-compatibility hidden options to
  mount_fusefs because these options never had any effect, and are therefore
  unlikely to be used.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/UPDATING
  projects/fuse2/sbin/mount_fusefs/mount_fusefs.c
  projects/fuse2/share/man/man5/fusefs.5
  projects/fuse2/sys/fs/fuse/fuse_vfsops.c

Modified: projects/fuse2/UPDATING
==============================================================================
--- projects/fuse2/UPDATING	Mon May 13 18:48:08 2019	(r347543)
+++ projects/fuse2/UPDATING	Mon May 13 19:03:46 2019	(r347544)
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20190513:
+	The "-o sync_unmount" and "-o init_backgrounded" options have been
+	removed from mount_fusefs(8).  You can safely remove them from your
+	scripts, because they had no effect.
+
 20190507:
 	The IPSEC option has been removed from GENERIC.  Users requiring
 	ipsec(4) must now load the ipsec(4) kernel module.

Modified: projects/fuse2/sbin/mount_fusefs/mount_fusefs.c
==============================================================================
--- projects/fuse2/sbin/mount_fusefs/mount_fusefs.c	Mon May 13 18:48:08 2019	(r347543)
+++ projects/fuse2/sbin/mount_fusefs/mount_fusefs.c	Mon May 13 19:03:46 2019	(r347544)
@@ -60,7 +60,6 @@ void	__usage_short(void);
 void	usage(void);
 void	helpmsg(void);
 void	showversion(void);
-int	init_backgrounded(void);
 
 static struct mntopt mopts[] = {
 	#define ALTF_PRIVATE 0x01
@@ -73,8 +72,6 @@ static struct mntopt mopts[] = {
 	{ "max_read=",           0, ALTF_MAXREAD, 1 },
 	#define ALTF_SUBTYPE 0x40
 	{ "subtype=",            0, ALTF_SUBTYPE, 1 },
-	#define ALTF_SYNC_UNMOUNT 0x80
-	{ "sync_unmount",        0, ALTF_SYNC_UNMOUNT, 1 },
 	/*
 	 * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into
 	 * the 'flags' argument to nmount(2).  We have to abuse altflags
@@ -107,7 +104,7 @@ static struct mntval mvals[] = {
 	{ 0, NULL, 0 }
 };
 
-#define DEFAULT_MOUNT_FLAGS ALTF_PRIVATE | ALTF_SYNC_UNMOUNT
+#define DEFAULT_MOUNT_FLAGS ALTF_PRIVATE
 
 int
 main(int argc, char *argv[])
@@ -409,7 +406,7 @@ main(int argc, char *argv[])
 		}
 	}
 
-	if (fd >= 0 && ! init_backgrounded() && close(fd) < 0) {
+	if (fd >= 0 && close(fd) < 0) {
 		if (pid)
 			kill(pid, SIGKILL);
 		err(1, "failed to close fuse device");
@@ -481,7 +478,6 @@ helpmsg(void)
 	        "    -o neglect_shares      don't report EBUSY when unmount attempted\n"
 	        "                           in presence of secondary mounts\n" 
 	        "    -o push_symlinks_in    prefix absolute symlinks with mountpoint\n"
-	        "    -o sync_unmount        do unmount synchronously\n"
 	        );
 	exit(EX_USAGE);
 }
@@ -491,18 +487,4 @@ showversion(void)
 {
 	puts("mount_fusefs [fuse4bsd] version: " FUSE4BSD_VERSION);
 	exit(EX_USAGE);
-}
-
-int
-init_backgrounded(void)
-{
-	int ibg;
-	size_t len;
-
-	len = sizeof(ibg);
-
-	if (sysctlbyname("vfs.fusefs.init_backgrounded", &ibg, &len, NULL, 0))
-		return (0);
-
-	return (ibg);
 }

Modified: projects/fuse2/share/man/man5/fusefs.5
==============================================================================
--- projects/fuse2/share/man/man5/fusefs.5	Mon May 13 18:48:08 2019	(r347543)
+++ projects/fuse2/share/man/man5/fusefs.5	Mon May 13 19:03:46 2019	(r347544)
@@ -101,9 +101,7 @@ misbehaving.
 .\"
 .\" vfs.fusefs.version - useless since the driver moved in-tree
 .\" vfs.fusefs.reclaim_revoked: I don't understand it well-enough
-.\" vfs.fusefs.sync_unmount: dead code
 .\" vfs.fusefs.enforce_dev_perms: I don't understand it well enough.
-.\" vfs.fusefs.init_backgrounded: dead code
 .\" vfs.fusefs.iov_credit: I don't understand it well enough
 .\" vfs.fusefs.iov_permanent_bufsize: I don't understand it well enough
 .\" vfs.fusefs.fix_broken_io: I don't understand it well enough

Modified: projects/fuse2/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_vfsops.c	Mon May 13 18:48:08 2019	(r347543)
+++ projects/fuse2/sys/fs/fuse/fuse_vfsops.c	Mon May 13 19:03:46 2019	(r347544)
@@ -119,17 +119,11 @@ struct vfsops fuse_vfsops = {
 	.vfs_statfs = fuse_vfsop_statfs,
 };
 
-SYSCTL_INT(_vfs_fusefs, OID_AUTO, init_backgrounded, CTLFLAG_RD,
-    SYSCTL_NULL_INT_PTR, 1, "indicate async handshake");
 static int fuse_enforce_dev_perms = 0;
 
 SYSCTL_INT(_vfs_fusefs, OID_AUTO, enforce_dev_perms, CTLFLAG_RW,
     &fuse_enforce_dev_perms, 0,
     "enforce fuse device permissions for secondary mounts");
-static unsigned sync_unmount = 1;
-
-SYSCTL_UINT(_vfs_fusefs, OID_AUTO, sync_unmount, CTLFLAG_RW,
-    &sync_unmount, 0, "specify when to use synchronous unmount");
 
 MALLOC_DEFINE(M_FUSEVFS, "fuse_filesystem", "buffer for fuse vfs layer");
 



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