diff options
Diffstat (limited to 'Documentation/filesystems/caching/backend-api.txt')
| -rw-r--r-- | Documentation/filesystems/caching/backend-api.txt | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt index 382d52cdaf2d..d78bab9622c6 100644 --- a/Documentation/filesystems/caching/backend-api.txt +++ b/Documentation/filesystems/caching/backend-api.txt | |||
| @@ -308,6 +308,18 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
| 308 | obtained by calling object->cookie->def->get_aux()/get_attr(). | 308 | obtained by calling object->cookie->def->get_aux()/get_attr(). |
| 309 | 309 | ||
| 310 | 310 | ||
| 311 | (*) Invalidate data object [mandatory]: | ||
| 312 | |||
| 313 | int (*invalidate_object)(struct fscache_operation *op) | ||
| 314 | |||
| 315 | This is called to invalidate a data object (as pointed to by op->object). | ||
| 316 | All the data stored for this object should be discarded and an | ||
| 317 | attr_changed operation should be performed. The caller will follow up | ||
| 318 | with an object update operation. | ||
| 319 | |||
| 320 | fscache_op_complete() must be called on op before returning. | ||
| 321 | |||
| 322 | |||
| 311 | (*) Discard object [mandatory]: | 323 | (*) Discard object [mandatory]: |
| 312 | 324 | ||
| 313 | void (*drop_object)(struct fscache_object *object) | 325 | void (*drop_object)(struct fscache_object *object) |
| @@ -419,7 +431,10 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
| 419 | 431 | ||
| 420 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS | 432 | 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 | 433 | returned if possible or fscache_end_io() called with a suitable error |
| 422 | code.. | 434 | code. |
| 435 | |||
| 436 | fscache_put_retrieval() should be called after a page or pages are dealt | ||
| 437 | with. This will complete the operation when all pages are dealt with. | ||
| 423 | 438 | ||
| 424 | 439 | ||
| 425 | (*) Request pages be read from cache [mandatory]: | 440 | (*) Request pages be read from cache [mandatory]: |
| @@ -526,6 +541,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. | 541 | error value should be 0 if successful and an error otherwise. |
| 527 | 542 | ||
| 528 | 543 | ||
| 544 | (*) Record that one or more pages being retrieved or allocated have been dealt | ||
| 545 | with: | ||
| 546 | |||
| 547 | void fscache_retrieval_complete(struct fscache_retrieval *op, | ||
| 548 | int n_pages); | ||
| 549 | |||
| 550 | This is called to record the fact that one or more pages have been dealt | ||
| 551 | with and are no longer the concern of this operation. When the number of | ||
| 552 | pages remaining in the operation reaches 0, the operation will be | ||
| 553 | completed. | ||
| 554 | |||
| 555 | |||
| 556 | (*) Record operation completion: | ||
| 557 | |||
| 558 | void fscache_op_complete(struct fscache_operation *op); | ||
| 559 | |||
| 560 | This is called to record the completion of an operation. This deducts | ||
| 561 | this operation from the parent object's run state, potentially permitting | ||
| 562 | one or more pending operations to start running. | ||
| 563 | |||
| 564 | |||
| 529 | (*) Set highest store limit: | 565 | (*) Set highest store limit: |
| 530 | 566 | ||
| 531 | void fscache_set_store_limit(struct fscache_object *object, | 567 | void fscache_set_store_limit(struct fscache_object *object, |
