Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_node.c
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
* This sysctl is no longer needed as of fuse protocol 7.23. Individual | * This sysctl is no longer needed as of fuse protocol 7.23. Individual | ||||
* servers can select the cache behavior they need for each mountpoint: | * servers can select the cache behavior they need for each mountpoint: | ||||
* - writethrough: the default | * - writethrough: the default | ||||
* - writeback: set FUSE_WRITEBACK_CACHE in fuse_init_out.flags | * - writeback: set FUSE_WRITEBACK_CACHE in fuse_init_out.flags | ||||
* - uncached: set FOPEN_DIRECT_IO for every file | * - uncached: set FOPEN_DIRECT_IO for every file | ||||
* The sysctl is retained primarily for use by jails supporting older FUSE | * The sysctl is retained primarily for use by jails supporting older FUSE | ||||
* protocols. It may be removed entirely once FreeBSD 11.3 and 12.0 are EOL. | * protocols. It may be removed entirely once FreeBSD 11.3 and 12.0 are EOL. | ||||
*/ | */ | ||||
SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, CTLTYPE_INT|CTLFLAG_RW, | SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
&fuse_data_cache_mode, 0, sysctl_fuse_cache_mode, "I", | &fuse_data_cache_mode, 0, sysctl_fuse_cache_mode, "I", | ||||
"Zero: disable caching of FUSE file data; One: write-through caching " | "Zero: disable caching of FUSE file data; One: write-through caching " | ||||
"(default); Two: write-back caching (generally unsafe)"); | "(default); Two: write-back caching (generally unsafe)"); | ||||
static int | static int | ||||
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS) | sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
int val, error; | int val, error; | ||||
▲ Show 20 Lines • Show All 365 Lines • Show Last 20 Lines |