diff options
author | Etienne Dublé <etienne.duble@imag.fr> | 2020-09-20 20:08:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-20 19:08:15 +0100 |
commit | ba3b225a126ebb3c6d4fe27c9f7c73aa4167001e (patch) | |
tree | 19149b92c169f419778e5e9799054b0c52243150 /include/fuse_common.h | |
parent | 5b901ee0315658035661332d6d85d8bfd8816b6b (diff) | |
download | libfuse-ba3b225a126ebb3c6d4fe27c9f7c73aa4167001e.tar.gz |
Allow caching symlinks in kernel page cache. (#551)
This commit defines a new capability called `FUSE_CAP_CACHE_SYMLINKS`.
It is off by default but you can now enable it by setting this flag in
in the `want` field of the `fuse_conn_info` structure.
When enabled, the kernel will save symlinks in its page cache,
by making use of the feature introduced in kernel 4.20:
https://github.com/torvalds/linux/commit/5571f1e65486be025f73fa6aa30fb03725d362a2
Diffstat (limited to 'include/fuse_common.h')
-rw-r--r-- | include/fuse_common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h index 39937d3..f5bfb6a 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -347,6 +347,19 @@ struct fuse_loop_config { #define FUSE_CAP_HANDLE_KILLPRIV (1 << 20) /** + * Indicates that the kernel supports caching symlinks in its page cache. + * + * When this feature is enabled, symlink targets are saved in the page cache. + * You can invalidate a cached link by calling: + * `fuse_lowlevel_notify_inval_inode(se, ino, 0, 0);` + * + * This feature is disabled by default. + * If the kernel supports it (>= 4.20), you can enable this feature by + * setting this flag in the `want` field of the `fuse_conn_info` structure. + */ +#define FUSE_CAP_CACHE_SYMLINKS (1 << 23) + +/** * 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 |