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
This commit is contained in:
parent
7648bc9fee
commit
4abf87666a
5
UPDATING
5
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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user