aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fuse_common.h17
-rw-r--r--include/fuse_kernel.h13
-rw-r--r--include/fuse_lowlevel.h2
3 files changed, 30 insertions, 2 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 2d686b2..7ac28d7 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -92,6 +92,11 @@ struct fuse_file_info {
* same file handle. */
uint64_t fh;
+ /** Passthrough file handle id. May be filled in by filesystem in
+ * create and open. It is used to create a passthrough connection
+ * between FUSE file and lower file system file. */
+ uint32_t passthrough_fh;
+
/** Lock owner id. Available in locking operations and flush */
uint64_t lock_owner;
@@ -359,6 +364,18 @@ struct fuse_loop_config {
#define FUSE_CAP_NO_OPENDIR_SUPPORT (1 << 24)
/**
+ * Indicates support for passthrough mode access for read/write operations.
+ *
+ * If this flag is set in the `capable` field of the `fuse_conn_info`
+ * structure, then the FUSE kernel module supports redirecting read/write
+ * operations to the lower file system instead of letting them to be handled
+ * by the FUSE daemon.
+ *
+ * This feature is disabled by default.
+ */
+#define FUSE_CAP_PASSTHROUGH (1 << 31)
+
+/**
* Ioctl flags
*
* FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 8a45f42..8bd7f0d 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -301,6 +301,7 @@ struct fuse_file_lock {
#define FUSE_CACHE_SYMLINKS (1 << 23)
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
+#define FUSE_PASSTHROUGH (1 << 31)
/**
* CUSE INIT request/reply flags
@@ -547,7 +548,7 @@ struct fuse_create_in {
struct fuse_open_out {
uint64_t fh;
uint32_t open_flags;
- uint32_t padding;
+ uint32_t passthrough_fh;
};
struct fuse_release_in {
@@ -574,6 +575,13 @@ struct fuse_read_in {
uint32_t padding;
};
+struct fuse_passthrough_out {
+ uint32_t fd;
+ /* For future implementation */
+ uint32_t len;
+ void * vec;
+};
+
#define FUSE_COMPAT_WRITE_IN_SIZE 24
struct fuse_write_in {
@@ -825,7 +833,8 @@ struct fuse_notify_retrieve_in {
};
/* Device ioctls: */
-#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)
+#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)
+#define FUSE_DEV_IOC_PASSTHROUGH_OPEN _IOW(229, 1, struct fuse_passthrough_out)
struct fuse_lseek_in {
uint64_t fh;
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
*