svn commit: r349412 - projects/fuse2/sys/fs/fuse
Alan Somers
asomers at FreeBSD.org
Wed Jun 26 15:15:26 UTC 2019
Author: asomers
Date: Wed Jun 26 15:15:24 2019
New Revision: 349412
URL: https://svnweb.freebsd.org/changeset/base/349412
Log:
fusefs: delete some unused mount options
The fusefs kernel module allegedly supported no_attrcache, no_readahed,
no_datacache, no_namecache, and no_mmap mount options, but the mount_fusefs
binary never did. So there was no way to ever activate these options.
Delete them. Some of them have alternatives:
no_attrcache: set the attr_valid time to 0 in FUSE_LOOKUP and FUSE_GETATTR
responses.
no_readahed: set max_readahead to 0 in the FUSE_INIT response.
no_datacache: set the vfs.fusefs.data_cache_mode sysctl to 0, or (coming
soon) set the attr_valid time to 0 and set FUSE_AUTO_INVAL_DATA in
the FUSE_INIT response.
no_namecache: set entry_valid time to 0 in FUSE_LOOKUP and FUSE_GETATTR
responses.
Sponsored by: The FreeBSD Foundation
Modified:
projects/fuse2/sys/fs/fuse/fuse_ipc.h
projects/fuse2/sys/fs/fuse/fuse_vfsops.c
Modified: projects/fuse2/sys/fs/fuse/fuse_ipc.h
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_ipc.h Wed Jun 26 12:26:38 2019 (r349411)
+++ projects/fuse2/sys/fs/fuse/fuse_ipc.h Wed Jun 26 15:15:24 2019 (r349412)
@@ -212,25 +212,17 @@ struct fuse_data {
};
#define FSESS_DEAD 0x0001 /* session is to be closed */
-#define FSESS_UNUSED0 0x0002 /* unused */
#define FSESS_INITED 0x0004 /* session has been inited */
#define FSESS_DAEMON_CAN_SPY 0x0010 /* let non-owners access this fs */
/* (and being observed by the daemon) */
#define FSESS_PUSH_SYMLINKS_IN 0x0020 /* prefix absolute symlinks with mp */
#define FSESS_DEFAULT_PERMISSIONS 0x0040 /* kernel does permission checking */
-#define FSESS_NO_ATTRCACHE 0x0080 /* no attribute caching */
-#define FSESS_NO_READAHEAD 0x0100 /* no readaheads */
-#define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */
-#define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */
-#define FSESS_NO_MMAP 0x0800 /* disable mmap */
#define FSESS_ASYNC_READ 0x1000 /* allow multiple reads of some file */
#define FSESS_POSIX_LOCKS 0x2000 /* daemon supports POSIX locks */
#define FSESS_EXPORT_SUPPORT 0x10000 /* daemon supports NFS-style lookups */
#define FSESS_MNTOPTS_MASK ( \
FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \
- FSESS_DEFAULT_PERMISSIONS | FSESS_NO_ATTRCACHE | \
- FSESS_NO_READAHEAD | FSESS_NO_DATACACHE | \
- FSESS_NO_NAMECACHE | FSESS_NO_MMAP)
+ FSESS_DEFAULT_PERMISSIONS)
enum fuse_data_cache_mode {
FUSE_CACHE_UC,
@@ -265,20 +257,13 @@ fsess_set_notimpl(struct mount *mp, int opcode)
static inline bool
fsess_opt_datacache(struct mount *mp)
{
- struct fuse_data *data = fuse_get_mpdata(mp);
-
- return (fuse_data_cache_mode != FUSE_CACHE_UC &&
- (data->dataflags & FSESS_NO_DATACACHE) == 0);
+ return (fuse_data_cache_mode != FUSE_CACHE_UC);
}
static inline bool
fsess_opt_mmap(struct mount *mp)
{
- struct fuse_data *data = fuse_get_mpdata(mp);
-
- if (fuse_data_cache_mode == FUSE_CACHE_UC)
- return (false);
- return ((data->dataflags & (FSESS_NO_DATACACHE | FSESS_NO_MMAP)) == 0);
+ return (fuse_data_cache_mode != FUSE_CACHE_UC);
}
/* Insert a new upgoing message */
Modified: projects/fuse2/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_vfsops.c Wed Jun 26 12:26:38 2019 (r349411)
+++ projects/fuse2/sys/fs/fuse/fuse_vfsops.c Wed Jun 26 15:15:24 2019 (r349412)
@@ -331,11 +331,6 @@ fuse_vfsop_mount(struct mount *mp)
FUSE_FLAGOPT(allow_other, FSESS_DAEMON_CAN_SPY);
FUSE_FLAGOPT(push_symlinks_in, FSESS_PUSH_SYMLINKS_IN);
FUSE_FLAGOPT(default_permissions, FSESS_DEFAULT_PERMISSIONS);
- FUSE_FLAGOPT(no_attrcache, FSESS_NO_ATTRCACHE);
- FUSE_FLAGOPT(no_readahed, FSESS_NO_READAHEAD);
- FUSE_FLAGOPT(no_datacache, FSESS_NO_DATACACHE);
- FUSE_FLAGOPT(no_namecache, FSESS_NO_NAMECACHE);
- FUSE_FLAGOPT(no_mmap, FSESS_NO_MMAP);
(void)vfs_scanopt(opts, "max_read=", "%u", &max_read);
if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) {
More information about the svn-src-projects
mailing list