From 4abf87666ad69ba377a7d0aa71e87bc8824759fa Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 May 2019 19:03:46 +0000 Subject: [PATCH] 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 --- UPDATING | 5 +++++ sbin/mount_fusefs/mount_fusefs.c | 22 ++-------------------- share/man/man5/fusefs.5 | 2 -- sys/fs/fuse/fuse_vfsops.c | 6 ------ 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/UPDATING b/UPDATING index bc759827da97..b68fa1db6edd 100644 --- a/UPDATING +++ b/UPDATING @@ -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. diff --git a/sbin/mount_fusefs/mount_fusefs.c b/sbin/mount_fusefs/mount_fusefs.c index 087df356dece..51db4502a61c 100644 --- a/sbin/mount_fusefs/mount_fusefs.c +++ b/sbin/mount_fusefs/mount_fusefs.c @@ -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); } @@ -492,17 +488,3 @@ 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); -} diff --git a/share/man/man5/fusefs.5 b/share/man/man5/fusefs.5 index 33f59fb4f185..bc4a8c3c5fe0 100644 --- a/share/man/man5/fusefs.5 +++ b/share/man/man5/fusefs.5 @@ -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 diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index fdd46aa04948..8a98d6c4e8c5 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -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");