diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_common.h | 12 | ||||
-rw-r--r-- | include/fuse_lowlevel.h | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h index 823a37d..0481aac 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -336,6 +336,18 @@ struct fuse_loop_config { #define FUSE_CAP_HANDLE_KILLPRIV (1 << 20) /** + * Indicates support for zero-message opendirs. If this flag is set in + * the `capable` field of the `fuse_conn_info` structure, then the filesystem + * may return `ENOSYS` from the opendir() handler to indicate success. Further + * opendir and releasedir messages will be handled in the kernel. (If this + * flag is not set, returning ENOSYS will be treated as an error and signalled + * to the caller.) + * + * Setting (or unsetting) this flag in the `want` field has *no effect*. + */ +#define FUSE_CAP_NO_OPENDIR_SUPPORT (1 << 24) + +/** * Ioctl flags * * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 87c362a..b7afe16 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -665,6 +665,13 @@ struct fuse_lowlevel_ops { * etc) in fi->fh, and use this in other all other directory * stream operations (readdir, releasedir, fsyncdir). * + * If this request is answered with an error code of ENOSYS and + * FUSE_CAP_NO_OPENDIR_SUPPORT is set in `fuse_conn_info.capable`, + * this is treated as success and future calls to opendir and + * releasedir will also succeed without being sent to the filesystem + * process. In addition, the kernel will cache readdir results + * as if opendir returned FOPEN_KEEP_CACHE | FOPEN_CACHE_DIR. + * * Valid replies: * fuse_reply_open * fuse_reply_err |