Lines Matching full:be
7 The FS-Cache system provides an API by which actual caches can be supplied to
17 To start off, a cache definition must be initialised and registered for each
21 The cache definition (struct fscache_cache) should be initialised by calling::
39 The cache should then be registered with FS-Cache by passing a pointer to the
46 Two extra arguments should also be supplied:
49 master index in this cache. Netfs primary index entries will be created
53 * "tagname" which, if given, should be a text string naming this cache. If
54 this is NULL, the identifier will be used instead. For CacheFS, the
55 identifier is set to name the underlying block device and the tag can be
59 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
79 the cache method to be invoked, or
83 In either case, this may not be an appropriate context in which to access the
87 be masqueraded for the duration of the cache driver's access to the cache.
114 The fields that might be of use to the backend describe the object
135 Structures of this type should be allocated by the cache backend and
140 The debug_id is a simple integer that can be used in debugging messages
141 that refer to a particular object. In such a case it should be printed
142 using "OBJ%x" to be consistent with FS-Cache.
146 in state FSCACHE_OBJECT_RECYCLING. The fscache_object struct should be
163 various asynchronous operations that need to be done as part of driving
168 An operation can be made exclusive upon an object by setting the
170 an operation needs more processing time, it should be enqueued again.
185 calling fscache_get_retrieval() and refs may be discarded by calling
188 A retrieval operation can be used by the backend to do retrieval work. To
189 do this, the retrieval->op.processor method pointer should be set
207 writes to be made. FS-Cache itself enqueues this operation and invokes
215 The cache backend provides FS-Cache with a table of operations that can be
226 This isn't strictly an operation, but should be pointed at a string naming
236 cookie in a particular cache. fscache_object_init() should be called on
239 This function may also be used to parse the index key to be used for
256 fscache_obtained_object() should be called once the object is in a
258 should also be called once a non-present object has been created.
260 If a lookup error occurs, fscache_object_lookup_error() should be called
286 These methods are used to exclusively lock an object. It must be possible
296 object cannot be reclaimed to make space. Return -ENOSPC if there's not
305 the object against the netfs's idea of the state. 0 should be returned
307 may also be returned.
314 new information should be in object->cookie->netfs_data. This can be
323 All the data stored for this object should be discarded and an
324 attr_changed operation should be performed. The caller will follow up
327 fscache_op_complete() must be called on op before returning.
347 be freed when all the references to it are released.
380 be expanded. In such a case, the object will be withdrawn from service.
391 This is called to request that cache space be reserved to hold the data
392 for an object and the metadata used to track it. Zero size should be
401 pages, but not required. An object may be pruned down to its reservation
405 * Request page be read from cache [mandatory]::
415 If there's no page in the cache, then -ENODATA should be returned if the
419 If there is suitable data in the cache, then a read operation should be
420 queued and 0 returned. When the read finishes, fscache_end_io() should be
423 The fscache_mark_pages_cached() should be called for the page if any cache
426 pages to be marked at once.
428 The retrieval record pointed to by op should be retained for each page
432 The retrieval record may be used to get CPU time via the FS-Cache thread
433 pool. If this is desired, the op->op.processor should be set to point to
435 be called at an appropriate point to request CPU time. For instance, the
436 retrieval routine could be enqueued upon the completion of a disk read.
439 If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
443 fscache_put_retrieval() should be called after a page or pages are dealt
447 * Request pages be read from cache [mandatory]::
456 started must be added to the page cache for the specified mapping and also
457 to the LRU. Such pages must also be removed from the pages list and
460 If there was an error such as -ENOMEM, then that should be returned; else
461 if one or more pages couldn't be read or allocated, then -ENOBUFS should
462 be returned; else if one or more pages couldn't be read, then -ENODATA
463 should be returned. If all the pages are dispatched then 0 should be
467 * Request page be allocated in the cache [mandatory]::
474 read from the cache, even if there's data there that could be retrieved.
478 If there's no backing block available, then -ENOBUFS should be returned
480 allocated, then the netfs page should be marked and 0 returned.
483 * Request pages be allocated in the cache [mandatory]::
491 nr_pages should be treated as for the read_or_alloc_pages() method.
494 * Request page be written to cache [mandatory]::
507 If an error occurred, then a negative error code should be returned,
508 otherwise zero should be returned. FS-Cache will take appropriate action
535 release) will be passed from the netfs to the cache backend for the
538 This does not actually withdraw the cache. That must be done separately.
547 error value should be 0 if successful and an error otherwise.
558 pages remaining in the operation reaches 0, the operation will be
599 retrieved from the cache can be found.
601 One of three values will be returned:
612 be discarded.
626 This must be called to inform FS-Cache that an object that belonged to a
641 known at this point that there can't be any data in the cache.
643 This may be called multiple times on an object. Only the first call is
653 only be called once for any particular object.
658 this object, that there may be data available, and that reads can
669 and causes it to move into a state whereby it will be withdrawn as soon
679 discarded from the cache and the lookup will be performed again.
688 object. The why parameter should be set to indicate the reason:
718 op->op.processor callback function. This function may be called from
726 For debugging purposes, this may be used to turn the state that an object