History

fuse: enable caching of symlinks

FUSE file reads are cached in the page cache, but symlink reads are not. This patch enables FUSE READLINK operations to be cached which can improve performance of some FUSE workloads. In particular, I'm working on a FUSE filesystem for access to source code and discovered that about a 10% improvement to build times is achieved with this patch (there are a lot of symlinks in the source tree).

Dan Schatzberg committed 8 years ago

Commit 5571f1e1 parent 9a2eb244 files · +92 −26Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/fuse.h+3−0
@@ -121,6 +121,7 @@ · 120 unmodified lines
121121 * - add FUSE_COPY_FILE_RANGE
122122 * - add FOPEN_CACHE_DIR
123123 * - add FUSE_MAX_PAGES, add max_pages to init_out
124+ * - add FUSE_CACHE_SYMLINKS
124125 */
125126
126127 #ifndef _LINUX_FUSE_H
@@ -257,6 +258,7 @@ struct fuse_file_lock { · 130 unmodified lines
257258 * FUSE_POSIX_ACL: filesystem supports posix acls
258259 * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED
259260 * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages
261+ * FUSE_CACHE_SYMLINKS: cache READLINK responses
260262 */
261263 #define FUSE_ASYNC_READ (1 << 0)
262264 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -281,6 +283,7 @@ struct fuse_file_lock { · 18 unmodified lines
281283 #define FUSE_POSIX_ACL (1 << 20)
282284 #define FUSE_ABORT_ERROR (1 << 21)
283285 #define FUSE_MAX_PAGES (1 << 22)
286+#define FUSE_CACHE_SYMLINKS (1 << 23)
284287
285288 /**
286289 * CUSE INIT request/reply flags