diff options
Diffstat (limited to 'Documentation/filesystems/caching')
-rw-r--r-- | Documentation/filesystems/caching/backend-api.txt | 9 | ||||
-rw-r--r-- | Documentation/filesystems/caching/netfs-api.txt | 17 |
2 files changed, 22 insertions, 4 deletions
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt index d78bab9622c6..277d1e810670 100644 --- a/Documentation/filesystems/caching/backend-api.txt +++ b/Documentation/filesystems/caching/backend-api.txt | |||
@@ -299,6 +299,15 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
299 | enough space in the cache to permit this. | 299 | enough space in the cache to permit this. |
300 | 300 | ||
301 | 301 | ||
302 | (*) Check coherency state of an object [mandatory]: | ||
303 | |||
304 | int (*check_consistency)(struct fscache_object *object) | ||
305 | |||
306 | This method is called to have the cache check the saved auxiliary data of | ||
307 | the object against the netfs's idea of the state. 0 should be returned | ||
308 | if they're consistent and -ESTALE otherwise. -ENOMEM and -ERESTARTSYS | ||
309 | may also be returned. | ||
310 | |||
302 | (*) Update object [mandatory]: | 311 | (*) Update object [mandatory]: |
303 | 312 | ||
304 | int (*update_object)(struct fscache_object *object) | 313 | int (*update_object)(struct fscache_object *object) |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 97e6c0ecc5ef..12b344251523 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
@@ -32,7 +32,7 @@ This document contains the following sections: | |||
32 | (9) Setting the data file size | 32 | (9) Setting the data file size |
33 | (10) Page alloc/read/write | 33 | (10) Page alloc/read/write |
34 | (11) Page uncaching | 34 | (11) Page uncaching |
35 | (12) Index and data file update | 35 | (12) Index and data file consistency |
36 | (13) Miscellaneous cookie operations | 36 | (13) Miscellaneous cookie operations |
37 | (14) Cookie unregistration | 37 | (14) Cookie unregistration |
38 | (15) Index invalidation | 38 | (15) Index invalidation |
@@ -690,9 +690,18 @@ written to the cache and for the cache to finish with the page generally. No | |||
690 | error is returned. | 690 | error is returned. |
691 | 691 | ||
692 | 692 | ||
693 | ========================== | 693 | =============================== |
694 | INDEX AND DATA FILE UPDATE | 694 | INDEX AND DATA FILE CONSISTENCY |
695 | ========================== | 695 | =============================== |
696 | |||
697 | To find out whether auxiliary data for an object is up to data within the | ||
698 | cache, the following function can be called: | ||
699 | |||
700 | int fscache_check_consistency(struct fscache_cookie *cookie) | ||
701 | |||
702 | This will call back to the netfs to check whether the auxiliary data associated | ||
703 | with a cookie is correct. It returns 0 if it is and -ESTALE if it isn't; it | ||
704 | may also return -ENOMEM and -ERESTARTSYS. | ||
696 | 705 | ||
697 | To request an update of the index data for an index or other object, the | 706 | To request an update of the index data for an index or other object, the |
698 | following function should be called: | 707 | following function should be called: |