diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-05-10 11:52:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 17:52:20 +0200 |
commit | 2bdec0bc22ce39b307e299ee9ec19d1c58b640de (patch) | |
tree | c1595664c90b2012ce97e6e8290d9b221a51e0c3 /include/fuse_lowlevel.h | |
parent | 0128f5efe8d4bdf1256a358358dd0ac3098a66ee (diff) | |
download | libfuse-2bdec0bc22ce39b307e299ee9ec19d1c58b640de.tar.gz |
Handle NO_OPEN/NO_OPENDIR support automatically (#949)
If the file system doesn't provide a ->open or an ->opendir, and the
kernel supports FUSE_CAP_NO_OPEN_SUPPORT or FUSE_CAP_NO_OPENDIR_SUPPORT,
allow the implementation to set FUSE_CAP_NO_OPEN*_SUPPORT on conn->want
in order to automatically get this behavior. Expand the documentation
to be more explicit about the behavior of libfuse in the different cases
WRT this capability.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r-- | include/fuse_lowlevel.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 330d40e..8ff111a 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -532,6 +532,13 @@ struct fuse_lowlevel_ops { * future calls to open and release will also succeed without being * sent to the filesystem process. * + * To get this behavior without providing an opendir handler, you may + * set FUSE_CAP_NO_OPEN_SUPPORT in `fuse_conn_info.want` on supported + * kernels to automatically get the zero message open(). + * + * If this callback is not provided and FUSE_CAP_NO_OPEN_SUPPORT is not + * set in `fuse_conn_info.want` then an empty reply will be sent. + * * Valid replies: * fuse_reply_open * fuse_reply_err @@ -705,6 +712,13 @@ struct fuse_lowlevel_ops { * process. In addition, the kernel will cache readdir results * as if opendir returned FOPEN_KEEP_CACHE | FOPEN_CACHE_DIR. * + * To get this behavior without providing an opendir handler, you may + * set FUSE_CAP_NO_OPENDIR_SUPPORT in `fuse_conn_info.want` on supported + * kernels to automatically get the zero message opendir(). + * + * If this callback is not provided and FUSE_CAP_NO_OPENDIR_SUPPORT is + * not set in `fuse_conn_info.want` then an empty reply will be sent. + * * Valid replies: * fuse_reply_open * fuse_reply_err |