From 4ec109d1c447bbf5be05854e32d8683bb1df5a80 Mon Sep 17 00:00:00 2001 From: Horst Birthelmer Date: Wed, 20 Nov 2024 16:14:43 +0100 Subject: 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 --- include/fuse_lowlevel.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/fuse_lowlevel.h') 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); + }; /** -- cgit v1.2.3