summaryrefslogtreecommitdiffstats
path: root/fs/fscache/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-08-21 23:29:38 +0200
committerDavid Howells <dhowells@redhat.com>2013-09-06 10:17:30 +0200
commitda9803bc8812f5bd3b26baaa90e515b843c65ff7 (patch)
tree889b39ec88863fb46606cf345eeb4fdf8a90a67e /fs/fscache/internal.h
parentLinux 3.11 (diff)
downloadlinux-da9803bc8812f5bd3b26baaa90e515b843c65ff7.tar.xz
linux-da9803bc8812f5bd3b26baaa90e515b843c65ff7.zip
FS-Cache: Add interface to check consistency of a cached object
Extend the fscache netfs API so that the netfs can ask as to whether a cache object is up to date with respect to its corresponding netfs object: int fscache_check_consistency(struct fscache_cookie *cookie) This will call back to the netfs to check whether the auxiliary data associated with a cookie is correct. It returns 0 if it is and -ESTALE if it isn't; it may also return -ENOMEM and -ERESTARTSYS. The backends now have to implement a mandatory operation pointer: int (*check_consistency)(struct fscache_object *object) that corresponds to the above API call. FS-Cache takes care of pinning the object and the cookie in memory and managing this call with respect to the object state. Original-author: Hongyi Jia <jiayisuse@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: Hongyi Jia <jiayisuse@gmail.com> cc: Milosz Tanski <milosz@adfin.com>
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r--fs/fscache/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index 12d505bedb5c..4226f6680b06 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -130,6 +130,12 @@ extern void fscache_operation_gc(struct work_struct *);
/*
* page.c
*/
+extern int fscache_wait_for_deferred_lookup(struct fscache_cookie *);
+extern int fscache_wait_for_operation_activation(struct fscache_object *,
+ struct fscache_operation *,
+ atomic_t *,
+ atomic_t *,
+ void (*)(struct fscache_operation *));
extern void fscache_invalidate_writes(struct fscache_cookie *);
/*