Lines Matching +full:zero +full:- +full:initialised
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>.
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:
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
39 previously initialised cache definition to:
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
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.
150 initialised by calling fscache_object_init(object).
153 (*) FS-Cache operation record:
165 FS-Cache has a pool of threads that it uses to give CPU time to the
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
219 The cache backend provides FS-Cache with a table of operations that can be
242 multiple lookup calls to turn it into a more convenient form. FS-Cache
260 should also be called once a non-present object has been created.
298 object cannot be reclaimed to make space. Return -ENOSPC if there's not
308 if they're consistent and -ESTALE otherwise. -ENOMEM and -ERESTARTSYS
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).
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
394 for an object and the metadata used to track it. Zero size should be
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
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
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
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