aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2002-12-10 12:26:00 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2002-12-10 12:26:00 +0000
commitc8ba2379a8dae3cc7a7fdeb6ee00fb95332212aa (patch)
tree8b1f359e15a795d5caef790e49637b6f457c7dcf /include
parent5e427cd2f1f312f31b998e714028580e16a86efa (diff)
downloadlibfuse-c8ba2379a8dae3cc7a7fdeb6ee00fb95332212aa.tar.gz
added release() callback
Diffstat (limited to 'include')
-rw-r--r--include/fuse.h8
-rw-r--r--include/linux/fuse.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 28d5f3b..f92914f 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -75,6 +75,13 @@ typedef int (*fuse_dirfil_t) (fuse_dirh_t, const char *, int type);
* - read(), write() are not passed a filehandle, but rather a
* pathname. The offset of the read and write is passed as the last
* argument, like the pread() and pwrite() system calls.
+ *
+ * - release() is called when an open file has:
+ * 1) all file descriptors closed
+ * 2) all memory mappings unmapped
+ * This call need only be implemented if this information is required,
+ * otherwise set this function to NULL.
+ *
*/
struct fuse_operations {
int (*getattr) (const char *, struct stat *);
@@ -95,6 +102,7 @@ struct fuse_operations {
int (*read) (const char *, char *, size_t, off_t);
int (*write) (const char *, const char *, size_t, off_t);
int (*statfs) (struct fuse_statfs *);
+ int (*release) (const char *);
};
/** Extra context that may be needed by some filesystems */
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 24905c4..eef77d9 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -93,6 +93,7 @@ enum fuse_opcode {
FUSE_READ = 15,
FUSE_WRITE = 16,
FUSE_STATFS = 17,
+ FUSE_RELEASE = 18
};
/* Conservative buffer size for the client */