diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/caching/backend-api.txt | 26 | ||||
-rw-r--r-- | Documentation/filesystems/caching/operations.txt | 2 |
2 files changed, 26 insertions, 2 deletions
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt index 382d52cdaf2d..f4769b9399df 100644 --- a/Documentation/filesystems/caching/backend-api.txt +++ b/Documentation/filesystems/caching/backend-api.txt | |||
@@ -419,7 +419,10 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
419 | 419 | ||
420 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS | 420 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS |
421 | returned if possible or fscache_end_io() called with a suitable error | 421 | returned if possible or fscache_end_io() called with a suitable error |
422 | code.. | 422 | code. |
423 | |||
424 | fscache_put_retrieval() should be called after a page or pages are dealt | ||
425 | with. This will complete the operation when all pages are dealt with. | ||
423 | 426 | ||
424 | 427 | ||
425 | (*) Request pages be read from cache [mandatory]: | 428 | (*) Request pages be read from cache [mandatory]: |
@@ -526,6 +529,27 @@ FS-Cache provides some utilities that a cache backend may make use of: | |||
526 | error value should be 0 if successful and an error otherwise. | 529 | error value should be 0 if successful and an error otherwise. |
527 | 530 | ||
528 | 531 | ||
532 | (*) Record that one or more pages being retrieved or allocated have been dealt | ||
533 | with: | ||
534 | |||
535 | void fscache_retrieval_complete(struct fscache_retrieval *op, | ||
536 | int n_pages); | ||
537 | |||
538 | This is called to record the fact that one or more pages have been dealt | ||
539 | with and are no longer the concern of this operation. When the number of | ||
540 | pages remaining in the operation reaches 0, the operation will be | ||
541 | completed. | ||
542 | |||
543 | |||
544 | (*) Record operation completion: | ||
545 | |||
546 | void fscache_op_complete(struct fscache_operation *op); | ||
547 | |||
548 | This is called to record the completion of an operation. This deducts | ||
549 | this operation from the parent object's run state, potentially permitting | ||
550 | one or more pending operations to start running. | ||
551 | |||
552 | |||
529 | (*) Set highest store limit: | 553 | (*) Set highest store limit: |
530 | 554 | ||
531 | void fscache_set_store_limit(struct fscache_object *object, | 555 | void fscache_set_store_limit(struct fscache_object *object, |
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.txt index b6b070c57cbf..bee2a5f93d60 100644 --- a/Documentation/filesystems/caching/operations.txt +++ b/Documentation/filesystems/caching/operations.txt | |||
@@ -174,7 +174,7 @@ Operations are used through the following procedure: | |||
174 | necessary (the object might have died whilst the thread was waiting). | 174 | necessary (the object might have died whilst the thread was waiting). |
175 | 175 | ||
176 | When it has finished doing its processing, it should call | 176 | When it has finished doing its processing, it should call |
177 | fscache_put_operation() on it. | 177 | fscache_op_complete() and fscache_put_operation() on it. |
178 | 178 | ||
179 | (4) The operation holds an effective lock upon the object, preventing other | 179 | (4) The operation holds an effective lock upon the object, preventing other |
180 | exclusive ops conflicting until it is released. The operation can be | 180 | exclusive ops conflicting until it is released. The operation can be |