Lines Matching refs:be
5 The FS-Cache system provides an API by which actual caches can be supplied to
16 To start off, a cache definition must be initialised and registered for each
20 The cache definition (struct fscache_cache) should be initialised by calling:
38 The cache should then be registered with FS-Cache by passing a pointer to the
45 Two extra arguments should also be supplied:
48 master index in this cache. Netfs primary index entries will be created
52 (*) "tagname" which, if given, should be a text string naming this cache. If
53 this is NULL, the identifier will be used instead. For CacheFS, the
54 identifier is set to name the underlying block device and the tag can be
58 is already in use. 0 will be returned on success.
65 A cache can be withdrawn from the system by calling this function with a
80 the cache method to be invoked, or
84 In either case, this may not be an appropriate context in which to access the
88 be masqueraded for the duration of the cache driver's access to the cache.
117 The fields that might be of use to the backend describe the object
138 Structures of this type should be allocated by the cache backend and
143 The debug_id is a simple integer that can be used in debugging messages
144 that refer to a particular object. In such a case it should be printed
145 using "OBJ%x" to be consistent with FS-Cache.
149 in state FSCACHE_OBJECT_RECYCLING. The fscache_object struct should be
166 various asynchronous operations that need to be done as part of driving
171 An operation can be made exclusive upon an object by setting the
173 an operation needs more processing time, it should be enqueued again.
188 calling fscache_get_retrieval() and refs may be discarded by calling
191 A retrieval operation can be used by the backend to do retrieval work. To
192 do this, the retrieval->op.processor method pointer should be set
210 writes to be made. FS-Cache itself enqueues this operation and invokes
219 The cache backend provides FS-Cache with a table of operations that can be
228 This isn't strictly an operation, but should be pointed at a string naming
238 cookie in a particular cache. fscache_object_init() should be called on
241 This function may also be used to parse the index key to be used for
258 fscache_obtained_object() should be called once the object is in a
260 should also be called once a non-present object has been created.
262 If a lookup error occurs, fscache_object_lookup_error() should be called
288 These methods are used to exclusively lock an object. It must be possible
298 object cannot be reclaimed to make space. Return -ENOSPC if there's not
307 the object against the netfs's idea of the state. 0 should be returned
309 may also be returned.
316 new information should be in object->cookie->netfs_data. This can be
325 All the data stored for this object should be discarded and an
326 attr_changed operation should be performed. The caller will follow up
329 fscache_op_complete() must be called on op before returning.
349 be freed when all the references to it are released.
382 be expanded. In such a case, the object will be withdrawn from service.
393 This is called to request that cache space be reserved to hold the data
394 for an object and the metadata used to track it. Zero size should be
403 pages, but not required. An object may be pruned down to its reservation
407 (*) Request page be read from cache [mandatory]:
417 If there's no page in the cache, then -ENODATA should be returned if the
421 If there is suitable data in the cache, then a read operation should be
422 queued and 0 returned. When the read finishes, fscache_end_io() should be
425 The fscache_mark_pages_cached() should be called for the page if any cache
428 pages to be marked at once.
430 The retrieval record pointed to by op should be retained for each page
434 The retrieval record may be used to get CPU time via the FS-Cache thread
435 pool. If this is desired, the op->op.processor should be set to point to
437 be called at an appropriate point to request CPU time. For instance, the
438 retrieval routine could be enqueued upon the completion of a disk read.
441 If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
445 fscache_put_retrieval() should be called after a page or pages are dealt
449 (*) Request pages be read from cache [mandatory]:
458 started must be added to the page cache for the specified mapping and also
459 to the LRU. Such pages must also be removed from the pages list and
462 If there was an error such as -ENOMEM, then that should be returned; else
463 if one or more pages couldn't be read or allocated, then -ENOBUFS should
464 be returned; else if one or more pages couldn't be read, then -ENODATA
465 should be returned. If all the pages are dispatched then 0 should be
469 (*) Request page be allocated in the cache [mandatory]:
476 read from the cache, even if there's data there that could be retrieved.
480 If there's no backing block available, then -ENOBUFS should be returned
482 allocated, then the netfs page should be marked and 0 returned.
485 (*) Request pages be allocated in the cache [mandatory]:
493 nr_pages should be treated as for the read_or_alloc_pages() method.
496 (*) Request page be written to cache [mandatory]:
509 If an error occurred, then a negative error code should be returned,
510 otherwise zero should be returned. FS-Cache will take appropriate action
538 release) will be passed from the netfs to the cache backend for the
541 This does not actually withdraw the cache. That must be done separately.
550 error value should be 0 if successful and an error otherwise.
561 pages remaining in the operation reaches 0, the operation will be
602 retrieved from the cache can be found.
604 One of three values will be returned:
618 be discarded.
632 This must be called to inform FS-Cache that an object that belonged to a
647 known at this point that there can't be any data in the cache.
649 This may be called multiple times on an object. Only the first call is
659 only be called once for any particular object.
664 this object, that there may be data available, and that reads can
675 and causes it to move into a state whereby it will be withdrawn as soon
694 op->op.processor callback function. This function may be called from
702 For debugging purposes, this may be used to turn the state that an object