aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar SÅ‚awek Rudnicki <slawek.rudnicki@editshare.com>2017-08-07 12:41:33 +0200
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-08-24 14:20:37 +0200
commit89f2bae00c1b87580f432f9a719ba8998493e6df (patch)
tree896d41f64caeef13a4c35f5a6333348067f5dfae /include
parent4eed36910fa73cfe3fe62530850d427e6841e14f (diff)
Allow inode cache invalidation in high-level API
We re-introduce the functionality of invalidating the caches for an inode specified by path by adding a new routine fuse_invalidate_path. This is useful for network-based file systems which use the high-level API, enabling them to notify the kernel about external changes. This is a revival of Miklos Szeredi's original code for the fuse_invalidate routine.
Diffstat (limited to 'include')
-rw-r--r--include/fuse.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 5eb257c..4898029 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -1010,6 +1010,19 @@ int fuse_getgroups(int size, gid_t list[]);
int fuse_interrupted(void);
/**
+ * Invalidates cache for the given path.
+ *
+ * This calls fuse_lowlevel_notify_inval_inode internally.
+ *
+ * @return 0 on successful invalidation, negative error value otherwise.
+ * This routine may return -ENOENT to indicate that there was
+ * no entry to be invalidated, e.g., because the path has not
+ * been seen before or has been forgotten; this should not be
+ * considered to be an error.
+ */
+int fuse_invalidate_path(struct fuse *f, const char *path);
+
+/**
* The real main function
*
* Do not call this directly, use fuse_main()