• Home
  • Raw
  • Download

Lines Matching +full:entry +full:- +full:method

2 			  FS-CACHE CACHE BACKEND API
5 The FS-Cache system provides an API by which actual caches can be supplied to
6 FS-Cache for it to then serve out to network filesystems and other interested
9 This API is declared in <linux/fscache-cache.h>.
34 (*) "idfmt" is a format and printf-style arguments for constructing a label
38 The cache should then be registered with FS-Cache by passing a pointer to the
47 (*) "fsdef" which should point to the object representation for the FS-Cache
49 here. FS-Cache keeps the caller's reference to the index object if
57 This function may return -ENOMEM if it ran out of memory or -EEXIST if the tag
80 the cache method to be invoked, or
82 (2) that of one of the processes in the FS-Cache thread pool.
89 This is left to the cache to handle; FS-Cache makes no effort in this regard.
96 The cache may present data to the outside world through FS-Cache's interfaces
97 in sysfs and procfs - the former for control and the latter for statistics.
108 (*) Index/Data file FS-Cache representation cookie:
124 (*) In-cache object representation:
139 passed to FS-Cache when requested by the appropriate cache operation. In
145 using "OBJ%x" to be consistent with FS-Cache.
153 (*) FS-Cache operation record:
165 FS-Cache has a pool of threads that it uses to give CPU time to the
168 method is called to give the op CPU time, and the release method to get
176 (*) FS-Cache retrieval operation record:
185 A structure of this type is allocated by FS-Cache to record retrieval and
192 do this, the retrieval->op.processor method pointer should be set
201 (*) FS-Cache storage operation record:
209 A structure of this type is allocated by FS-Cache to record outstanding
210 writes to be made. FS-Cache itself enqueues this operation and invokes
211 the write_page() method on the object at appropriate times to effect
219 The cache backend provides FS-Cache with a table of operations that can be
237 This method is used to allocate a cache object representation to back a
242 multiple lookup calls to turn it into a more convenient form. FS-Cache
243 will call the lookup_complete() method to allow the cache to release the
251 This method is used to look up an object, given that the object is already
255 The method should call fscache_object_lookup_negative() as soon as
260 should also be called once a non-present object has been created.
270 This method is called to ask the cache to release any resources it was
278 This method is called to increment the reference count on an object. It
298 object cannot be reclaimed to make space. Return -ENOSPC if there's not
306 This method is called to have the cache check the saved auxiliary data of
308 if they're consistent and -ESTALE otherwise. -ENOMEM and -ERESTARTSYS
315 This is called to update the index entry for the specified object. The
316 new information should be in object->cookie->netfs_data. This can be
317 obtained by calling object->cookie->def->get_aux()/get_attr().
324 This is called to invalidate a data object (as pointed to by op->object).
336 This method is called to indicate that an object has been unbound from its
340 This method should not attempt to release any references held by the
341 caller. The caller will invoke the put_object() method as appropriate.
348 This method is used to discard a reference to an object. The object may
375 method.
378 It should also call fscache_set_store_limit() to indicate to FS-Cache the
381 This method may return -ve if an error occurred or the cache object cannot
384 This operation is run asynchronously from FS-Cache's thread pool, and
397 This should return 0 if successful, -ENOSPC if there isn't enough space
398 available, or -ENOMEM or -EIO on other errors.
414 reserve a backing block if not. FS-Cache will have done as much checking
417 If there's no page in the cache, then -ENODATA should be returned if the
418 backend managed to reserve a backing block; -ENOBUFS or -ENOMEM if it
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
441 If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
456 This is like the read_or_alloc_page() method, except it is handed a list
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
475 This is like the read_or_alloc_page() method, except that it shouldn't
478 the write_page() method can write to the cache.
480 If there's no backing block available, then -ENOBUFS should be returned
481 (or -ENOMEM if there were other problems). If a block is successfully
492 This is an multiple page version of the allocate_page() method. pages and
493 nr_pages should be treated as for the read_or_alloc_pages() method.
502 successful read_or_alloc_page() call or similar. FS-Cache filters out
505 This method is called asynchronously from the FS-Cache thread pool. It is
506 not required to actually store anything, provided -ENODATA is then
510 otherwise zero should be returned. FS-Cache will take appropriate action
513 If this method returns success then FS-Cache will inform the netfs
517 (*) Discard retained per-page metadata [mandatory]:
527 FS-CACHE UTILITIES
530 FS-Cache provides some utilities that a cache backend may make use of:
536 This tells FS-Cache that an I/O error occurred in the cache. After this
579 This sets the limit FS-Cache imposes on the highest byte it's willing to
581 rejected by fscache_read_alloc_page() and co with -ENOBUFS.
632 This must be called to inform FS-Cache that an object that belonged to a
642 This is called to indicate to FS-Cache that a lookup process for an object
650 significant - all subsequent calls are ignored.
657 This is called to indicate to FS-Cache that a lookup process for an object
696 FSCACHE_OBJECT_IS_STALE - the object was stale and needs discarding.
697 FSCACHE_OBJECT_NO_SPACE - there was insufficient cache space
698 FSCACHE_OBJECT_WAS_RETIRED - the object was retired when relinquished.
699 FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.
715 This enqueues a retrieval record for processing by the FS-Cache thread
717 op->op.processor callback function. This function may be called from