diff options
author | therealneworld@gmail.com <therealneworld@gmail.com> | 2011-06-02 14:27:02 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-06-02 14:27:02 +0200 |
commit | 94c2b63955271d039c62e7c966aa82c9565d28ec (patch) | |
tree | a47133690e8d1a5aca9351dd8803e2e5fc4c5dc3 /include | |
parent | 4a9f6ab4805d805ac3b437c89d11ae365a0370f3 (diff) | |
download | android_external_fuse-94c2b63955271d039c62e7c966aa82c9565d28ec.tar.gz android_external_fuse-94c2b63955271d039c62e7c966aa82c9565d28ec.tar.bz2 android_external_fuse-94c2b63955271d039c62e7c966aa82c9565d28ec.zip |
add "remember" option
This works similar to "noforget" except that eventually the node will
be allowed to expire from the cache.
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h index b0e6f5b..7e52719 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -723,6 +723,34 @@ int fuse_is_lib_option(const char *opt); int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op, size_t op_size, void *user_data); +/** + * Start the cleanup thread when using option "remember". + * + * This is done automatically by fuse_loop_mt() + * @param fuse struct fuse pointer for fuse instance + * @return 0 on success and -1 on error + */ +int fuse_start_cleanup_thread(struct fuse *fuse); + +/** + * Stop the cleanup thread when using option "remember". + * + * This is done automatically by fuse_loop_mt() + * @param fuse struct fuse pointer for fuse instance + */ +void fuse_stop_cleanup_thread(struct fuse *fuse); + +/** + * Iterate over cache removing stale entries + * use in conjunction with "-oremember" + * + * NOTE: This is already done for the standard sessions + * + * @param fuse struct fuse pointer for fuse instance + * @return the number of seconds until the next cleanup + */ +int fuse_clean_cache(struct fuse *fuse); + /* * Stacking API */ |