aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHorst Birthelmer <hbirthelmer@ddn.com>2024-11-20 16:14:43 +0100
committerBernd Schubert <bernd.schubert@fastmail.fm>2024-11-27 13:38:56 +0100
commit4ec109d1c447bbf5be05854e32d8683bb1df5a80 (patch)
tree4283922b8aee6846ea111499285174232ed062b8 /include
parent8b34ed03682bb7806a6083b05187c4fc5475a135 (diff)
downloadlibfuse-4ec109d1c447bbf5be05854e32d8683bb1df5a80.tar.gz
support FUSE_TMPFILE in the low level API
Note that name hashes and using paths as parameters makes it very hard to support anonymous files in the high level API. Known Issues: - tests have to bail out when O_TMPFILE is not supported. This will always be the case with high level passthrough implementations. - test_create_and_link_tmpfile has to be skipped due to unidentified problems with github runner
Diffstat (limited to 'include')
-rw-r--r--include/fuse_lowlevel.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index e5c308c..3d398de 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -1302,6 +1302,29 @@ struct fuse_lowlevel_ops {
*/
void (*lseek) (fuse_req_t req, fuse_ino_t ino, off_t off, int whence,
struct fuse_file_info *fi);
+
+
+ /**
+ * Create a tempfile
+ *
+ * Tempfile means an anonymous file. It can be made into a normal file later
+ * by using linkat or such.
+ *
+ * If this is answered with an error ENOSYS this is treated by the kernel as
+ * a permanent failure and it will disable the feature and not ask again.
+ *
+ * Valid replies:
+ * fuse_reply_create
+ * fuse_reply_err
+ *
+ * @param req request handle
+ * @param parent inode number of the parent directory
+ * @param mode file type and mode with which to create the new file
+ * @param fi file information
+ */
+ void (*tmpfile) (fuse_req_t req, fuse_ino_t parent,
+ mode_t mode, struct fuse_file_info *fi);
+
};
/**