diff options
author | Alessio Balsini <balsini@google.com> | 2020-07-01 14:14:28 +0100 |
---|---|---|
committer | Alessio Balsini <balsini@google.com> | 2020-11-12 19:31:48 +0000 |
commit | 74ea28e46b6860a7663341a4268d6685699e302f (patch) | |
tree | 055ee0ab46564340653c868355e99db244210fcc /include/fuse_lowlevel.h | |
parent | 5d3920545beef6b010e555fbd19a94b3d3e056d9 (diff) | |
download | libfuse-74ea28e46b6860a7663341a4268d6685699e302f.tar.gz |
Enable passthrough mode for read/write operations
Add support for filesystem passthrough read/write of files.
When the FUSE_PASSTHROUGH capability is enabled, the FUSE daemon may
decide while handling the "open" or "create" operation, if the given
file can be accessed by that process in "passthrough" mode, meaning that
all the further read and write operations would be forwarded by the
kernel directly to the lower filesystem rather than to the FUSE daemon.
All requests that aren't read or write are still handled by the
userspace code.
This allows for an improved performance on reads and writes, especially
in the case of reads at random offsets, for which no (readahead)
caching mechanism would help, reducing the performance gap between FUSE
and native filesystem access.
Extend also the passthrough_hp example with the new passthrough feature.
Bug: 168023149
Test: atest ScopedStorageTest
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I38aff0cf7198b7cd92eccc97547d47f4e1132b00
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r-- | include/fuse_lowlevel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index e81c282..e916112 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -1349,6 +1349,8 @@ int fuse_reply_attr(fuse_req_t req, const struct stat *attr, */ int fuse_reply_readlink(fuse_req_t req, const char *link); +int fuse_passthrough_enable(fuse_req_t req, unsigned int fd); + /** * Reply with the canonical path for inotify * |