From 89f2bae00c1b87580f432f9a719ba8998493e6df Mon Sep 17 00:00:00 2001 From: SÅ‚awek Rudnicki Date: Mon, 7 Aug 2017 12:41:33 +0200 Subject: 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. --- include/fuse.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/fuse.h b/include/fuse.h index 5eb257c..4898029 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -1009,6 +1009,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 * -- cgit v1.2.3