Lines Matching refs:to

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
17 cache the backend wants to make available. For instance, CacheFS does this in
29 (*) "cache" is a pointer to the cache definition;
31 (*) "ops" is a pointer to the table of operations that the backend supports on
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
54 identifier is set to name the underlying block device and the tag can be
66 pointer to the cache definition:
80 the cache method to be invoked, or
84 In either case, this may not be an appropriate context in which to access the
87 The calling process's fsuid, fsgid and SELinux security identities may need to
88 be masqueraded for the duration of the cache driver's access to the cache.
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
117 The fields that might be of use to the backend describe the object
120 and matching index entries; these are required to provide some of the
139 passed to FS-Cache when requested by the appropriate cache operation. In
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.
147 Each object contains a pointer to the cookie that represents the object it
165 FS-Cache has a pool of threads that it uses to give CPU time to the
166 various asynchronous operations that need to be done as part of driving
168 method is called to give the op CPU time, and the release method to get
185 A structure of this type is allocated by FS-Cache to record retrieval and
186 allocation requests made by the netfs. This struct is then passed to the
187 backend to do the operation. The backend may get extra refs to it by
191 A retrieval operation can be used by the backend to do retrieval work. To
193 appropriately by the backend and fscache_enqueue_retrieval() called to
194 submit it to the thread pool. CacheFiles, for example, uses this to queue
197 The to_do field is an empty list available for the cache backend to use as
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
237 This method is used to allocate a cache object representation to back a
239 the object to initialise it prior to returning.
241 This function may also be used to parse the index key to be used for
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
252 allocated and attached to the cookie. This should instantiate that object
257 object is found to exist and the netfs indicates that it is valid then
259 position to have data stored in it. Similarly, fscache_obtained_object()
263 to abort the lookup of that object.
270 This method is called to ask the cache to release any resources it was
271 using to perform a lookup.
278 This method is called to increment the reference count on an object. It
288 These methods are used to exclusively lock an object. It must be possible
289 to schedule with the lock held, so a spinlock isn't sufficient.
297 These methods are used to pin an object into the cache. Once pinned an
298 object cannot be reclaimed to make space. Return -ENOSPC if there's not
299 enough space in the cache to permit this.
306 This method is called to have the cache check the saved auxiliary data of
315 This is called to update the index entry for the specified object. The
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
348 This method is used to discard a reference to an object. The object may
349 be freed when all the references to it are released.
356 This is called to ask the backend to synchronise a cache with its backing
364 This is called to ask a cache to perform any page dissociations as part of
372 This is called to indicate to the cache that certain attributes on a netfs
377 The cache may use the file size information to reserve space on the cache.
378 It should also call fscache_set_store_limit() to indicate to FS-Cache the
379 highest byte it's willing to store for an object.
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
395 taken as request to cancel a reservation.
402 exceed the reservation, it's permitted to refuse requests to allocate
403 pages, but not required. An object may be pruned down to its reservation
413 This is called to attempt to read a netfs page from the cache, or to
415 as it can before calling, but most of the work belongs to the backend.
418 backend managed to reserve a backing block; -ENOBUFS or -ENOMEM if it
426 metadata is retained. This will indicate to the netfs that the page needs
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
439 The to_do field in the retrieval record is provided to aid in this.
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
478 the write_page() method can write to the cache.
496 (*) Request page be written to cache [mandatory]:
501 This is called to write from a page on which there was a previously
506 not required to actually store anything, provided -ENODATA is then
507 returned to the next read of this page.
511 in response to an error, such as withdrawing this object.
538 release) will be passed from the netfs to the cache backend for the
549 This is called to note the end of an attempt to retrieve a page. The
559 This is called to record the fact that one or more pages have been dealt
569 This is called to record the completion of an operation. This deducts
571 one or more pending operations to start running.
579 This sets the limit FS-Cache imposes on the highest byte it's willing to
590 the netfs must call fscache_uncache_page() to unmark the pages.
599 This asks the netfs to perform a coherency check on an object that has
600 just been looked up. The cookie attached to the object will determine the
601 netfs to use. data and datalen should specify where the auxiliary data
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
645 This changes the state of an object to permit reads pending on lookup
646 completion to go off and start fetching data from the netfs server as it's
657 This is called to indicate to FS-Cache that a lookup process for an object
661 This changes the state of an object to indicate:
663 (1) if no call to fscache_object_lookup_negative() has been made on
675 and causes it to move into a state whereby it will be withdrawn as soon
683 This is called to indicate that the lookup procedure found an object in
693 This is called to indicate that the cache backend preemptively killed an
694 object. The why parameter should be set to indicate the reason:
699 FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.
707 These two functions are used to retain a retrieval record whilst doing
725 For debugging purposes, this may be used to turn the state that an object