diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 8 | ||||
-rw-r--r-- | include/linux/fuse.h | 1 |
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 */ |