This structure is initialized from the arguments passed to fuse_new(), and then passed to the file system's
init() handler which should ensure that the configuration
is compatible with the file system implementation.
- Since:
- libFUSE 3.0
-
Method Summary
Modifier and TypeMethodDescriptiondoubleThe timeout in seconds for which file attributes are cached for the purpose of checking if auto_cache should flush the file data on open.intIfac_attr_timeout_setis non-zero, theacAttrTimeout()ac_attr_timeout} is applied.doubleThe timeout in seconds for which file/directory attributes (as returned by e.g.intThis option is an alternative tokernel_cache.intdirectIo()This option disables the use of page cache (file content cache) in the kernel for this filesystem.doubleThe timeout in seconds for which name lookups will be cached.intgid()intThe default behavior is that if an open file is deleted, the file is renamed to a hidden file (.fuse_hiddenXXX), and only removed when the file is finally released.intintr()Allow requests to be interruptedintSpecify which signal number to send to the filesystem when a request is interrupted.intThis option disables flushing the cache of the file contents on every open(2).doubleThe timeout in seconds for which a negative lookup will be cached.intBy default, fuse waits for all pending writes to complete and calls the FLUSH operation on close(2) of every fuse fd.intIf this option is given the file-system handlers for the following operations will not receive path information: read, write, flush, release, fallocate, fsync, readdir, releasedir, fsyncdir, lock, ioctl and poll.intIf use_ino option is not given, still try to fill in the d_ino field in readdir(2).intremember()Normally, FUSE assigns inodes to paths only for as long as the kernel is aware of them.intsetGid()intsetMode()intsetUid()intuid()intumask()The bits to unset inst_modeintuseIno()Honor the st_ino field in the functionsgetattr()andfill_dir().
-
Method Details
-
setGid
-
gid
-
setUid
-
uid
-
setMode
-
umask
-
entryTimeout
double entryTimeout()The timeout in seconds for which name lookups will be cached.- Returns:
entry_timeoutvalue
-
negativeTimeout
double negativeTimeout()The timeout in seconds for which a negative lookup will be cached. This means, that if file did not exist (lookup returnedENOENT), the lookup will only be redone after the timeout, and the file/directory will be assumed to not exist until then. A value of zero means that negative lookups are not cached.- Returns:
negative_timeoutvalue
-
attrTimeout
double attrTimeout()The timeout in seconds for which file/directory attributes (as returned by e.g. thegetattrhandler) are cached.- Returns:
attr_timeoutvalue
-
intr
int intr()Allow requests to be interrupted- Returns:
intrvalue
-
intrSignal
int intrSignal()Specify which signal number to send to the filesystem when a request is interrupted.The default is hardcoded to
USR1.- Returns:
intr_signalvalue
-
remember
int remember()Normally, FUSE assigns inodes to paths only for as long as the kernel is aware of them. With this option inodes are instead remembered for at least this many seconds. This will require more memory, but may be necessary when using applications that make use of inode numbers.A number of -1 means that inodes will be remembered for the entire life-time of the file-system process.
- Returns:
remembervalue
-
hardRemove
int hardRemove()The default behavior is that if an open file is deleted, the file is renamed to a hidden file (.fuse_hiddenXXX), and only removed when the file is finally released. This relieves the filesystem implementation of having to deal with this problem. This option disables the hiding behavior, and files are removed immediately in an unlink operation (or in a rename operation which overwrites an existing file).It is recommended that you not use the hard_remove option. When hard_remove is set, the following libc functions fail on unlinked files (returning errno of
ENOENT): read(2), write(2), fsync(2), close(2), f*xattr(2), ftruncate(2), fstat(2), fchmod(2), fchown(2)- Returns:
hard_removevalue
-
useIno
int useIno()Honor the st_ino field in the functionsgetattr()andfill_dir(). This value is used to fill in the st_ino field in the stat(2), lstat(2), fstat(2) functions and the d_ino field in the readdir(2) function. The filesystem does not have to guarantee uniqueness, however some applications rely on this value being unique for the whole filesystem.Note that this does *not* affect the inode that libfuse and the kernel use internally (also called the "nodeid").
- Returns:
use_inovalue
-
readdirIno
int readdirIno()If use_ino option is not given, still try to fill in the d_ino field in readdir(2). If the name was previously looked up, and is still in the cache, the inode number found there will be used. Otherwise it will be set to -1. If use_ino option is given, this option is ignored.- Returns:
readdir_inovalue
-
directIo
int directIo()This option disables the use of page cache (file content cache) in the kernel for this filesystem. This has several affects:- Each read(2) or write(2) system call will initiate one or more read or write operations, data will not be cached in the kernel.
- The return value of the
read()andwrite()system calls will correspond to the return values of the read and write operations. This is useful for example if the file size is not known in advance (before reading it).
direct_iofield offuse_file_info- overwriting any value that was put there by the file system.- Returns:
direct_iovalue
-
kernelCache
int kernelCache()This option disables flushing the cache of the file contents on every open(2). This should only be enabled on filesystems where the file data is never changed externally (not through the mounted FUSE filesystem). Thus it is not suitable for network filesystems and other intermediate filesystems.NOTE: if this option is not specified (and neither direct_io) data is still cached after the open(2), so a read(2) system call will not always initiate a read operation.
Internally, enabling this option causes fuse to set the
keep_cachefield offuse_file_info- overwriting any value that was put there by the file system.- Returns:
kernel_cachevalue
-
autoCache
int autoCache()This option is an alternative tokernel_cache. Instead of unconditionally keeping cached data, the cached data is invalidated on open(2) if if the modification time or the size of the file has changed since it was last opened.- Returns:
auto_cachevalue
-
noRofdFlush
int noRofdFlush()By default, fuse waits for all pending writes to complete and calls the FLUSH operation on close(2) of every fuse fd. With this option, wait and FLUSH are not done for read-only fuse fd, similar to the behavior of NFS/SMB clients.- Returns:
no_rofd_flushvalue or 0 if not supported- Since:
- libFUSE 3.3
-
acAttrTimeoutSet
int acAttrTimeoutSet()Ifac_attr_timeout_setis non-zero, theacAttrTimeout()ac_attr_timeout} is applied.- Returns:
ac_attr_timeout_setvalue- See Also:
-
acAttrTimeout
double acAttrTimeout()The timeout in seconds for which file attributes are cached for the purpose of checking if auto_cache should flush the file data on open.- Returns:
ac_attr_timeoutvalue- See Also:
-
nullpathOk
int nullpathOk()If this option is given the file-system handlers for the following operations will not receive path information: read, write, flush, release, fallocate, fsync, readdir, releasedir, fsyncdir, lock, ioctl and poll.For the truncate, getattr, chmod, chown and utimens operations the path will be provided only if the struct fuse_file_info argument is NULL.
- Returns:
nullpath_okvalue
-