Lines Matching full:be
58 This first two fields should be filled in before registration, and the third
59 will be filled in by the registration function; any other fields should just be
67 entire in-cache hierarchy for this netfs will be scrapped and begun
70 (3) The cookie representing the primary index will be allocated according to
105 (1) Any index containing non-index objects should be restricted to a single
106 cache. Any such objects created within an index will be created in the
107 first cache only. The cache in which an index is created can be
110 (2) The entry data must be atomically journallable, so it is limited to about
111 400 bytes at present. At least 400 bytes will be available.
113 (3) The depth of the index tree should be judged with care as the search
121 To define an object, a structure of the following type should be filled out:
169 This function is invoked when an index needs to be instantiated in a cache
171 parent for the non-index object will be queried. Any indices above that
172 in the hierarchy may be stored in multiple caches. This function does not
173 need to be supplied for any non-index object or any index that will only
177 cache in the parent's list will be chosen, or failing that, the first
182 This function will be called to check that a match found in the cache for
187 If this function is absent, it will be assumed that matching objects in a
197 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted
199 This function can also be used to extract data from the auxiliary data in
207 valid until after the I/O completion is called, two functions may be
214 be called in interrupt context and so may not sleep.
221 or not. Note that several pages at once may be presented for marking.
223 The PG_fscache bit is set on the pages before this function would be
224 called, so the function need not be provided if this is sufficient.
231 unbound from a cookie and that all the marks on the pages should be
233 its tracking information so that the pages don't need to be explicitly
244 involves specifying the layout of the primary index (for AFS, this would be the
268 subtrees to be bound to particular caches, the second step is to look up cache
269 representation tags. This step is optional; it can be left entirely up to
270 FS-Cache as to which cache should be used. The problem with doing that is that
281 Any representation so obtained must be released by passing it to this function:
285 The tag will be retrieved by FS-Cache when it calls the object definition
294 be used to locate files. This is done by requesting a cookie for each index in
311 A unique key that represents the object within the parent must be pointed to by
314 An optional blob of auxiliary data that is to be stored within the cache can be
315 pointed to with aux_data and should be of length aux_data_len. This would
316 typically be used for storing coherency data.
318 The netfs may pass an arbitrary value in netfs_data and this will be presented
319 to it in the event of any calling back. This may also be used in tracing or
322 The cache tracks the size of the data attached to an object and this set to be
323 object_size. For indices, this should be 0. This value will be passed to the
333 object needs to be created somewhere down the hierarchy. Furthermore, an index
334 may be created in several different caches independently at different times.
337 A cookie will be created in the disabled state if enabled is false. A cookie
338 must be enabled to do anything with it. A disabled cookie can be enabled by
341 For example, with AFS, a cell would be added to the primary index. This index
351 And then a particular volume could be added to that index by ID, creating
366 The fourth step is to request a data file be created in the cache. This is
368 the object definition should be something other than index type.
382 An optional step is to request an object of miscellaneous type be created in
384 difference is that the type in the object definition should be something other
385 than index type. Whilst the parent object could be an index, it's more likely
386 it would be some other type of object such as a data file.
395 Miscellaneous objects might be used to store extended attributes or directory
413 be rebuffed with -ENOBUFS.
429 (1) A page should not be re-read or re-allocated without uncaching it first.
431 (2) A read or allocated page must be uncached when the netfs page is released
434 (3) A page should only be written to the cache if previous read or allocated.
468 (1) The mark_pages_cached() cookie operation will be called on that page.
475 (4) When the read is complete, end_io_func() will be invoked with:
481 (*) The context argument passed to the above function. This will be
486 If an error occurs, it should be assumed that the page contains no usable
487 data. fscache_readpages_cancel() may need to be called.
489 end_io_func() will be called in process context if the read is results in
490 an error, but it might be called in interrupt context if the read is
493 Otherwise, if there's not a copy available in cache, but the cache may be able
496 (1) The mark_pages_cached() cookie operation will be called on that page.
498 (2) A block may be reserved in the cache and attached to the object at the
510 Alternatively, if there's not expected to be any data in the cache for a page
511 because the file has been extended, a block can simply be allocated instead:
519 rather than -ENODATA as the other would. One or the other must be performed
522 The mark_pages_cached() cookie operation will be called on the page if
530 initial download or if a user performs a write), then the page should be
539 contain the data to be written (and is also used to specify the page number),
550 Else if space can be allocated in the cache to hold this page:
552 (1) PG_fscache_write will be set on the page.
560 anyone waiting for that bit will be woken up.
562 Else if there's no space available in the cache, -ENOBUFS will be returned. It
563 is also possible for the PG_fscache_write bit to be cleared when no write took
587 be merged for greater efficiency.
589 (2) The mark_pages_cached() cookie operation will be called on several pages
592 (3) If there was an general error, then that error will be returned.
594 Else if some pages couldn't be allocated or read, then -ENOBUFS will be
597 Else if some pages couldn't be read but were allocated, then -ENODATA will
598 be returned.
600 Otherwise, if all pages had reads dispatched, then 0 will be returned, the
601 list will be empty and *nr_pages will be 0.
603 (4) end_io_func will be called once for each page being read as the reads
604 complete. It will be called in process context if error != 0, but it may
605 be called in interrupt context if there is no error.
617 those pages will need to have any marks and reservations removed. This can be
623 prior to returning to the caller. The cookie argument should be as passed to
624 fscache_read_or_alloc_pages(). Every page in the pages list will be examined
625 and any that have PG_fscache set will be uncached.
632 To uncache a page, this function should be called:
638 might be holding for this netfs page. This function must be called once for
642 Note that pages can't be explicitly deleted from the a data file. The whole
643 data file must be retired (see the relinquish cookie function below).
670 releasepage(). It will return false if the page cannot be released yet for
671 some reason and if it returns true, the page has been uncached and can now be
676 in which case the page will not be stored in the cache this time.
700 cache, the following function can be called:
711 following function should be called:
717 that is non-NULL and then schedule this to be stored on disk. The update
718 method in the parent index definition will be called to transfer the data.
734 can be enabled or disabled later. To disable a cookie, call:
749 Cookies can be enabled or reenabled with:
762 ruling as to whether or not enablement should actually be permitted to begin.
764 All possible failures are handled internally. The cookie will only be marked
778 There are a number of operations that can be used to control cookies:
785 These operations permit data cookies to be pinned into the cache and to
797 This permits a netfs to request cache space be reserved to store up to the
801 If size is given as zero then the reservation will be cancelled.
808 Note that this doesn't pin an object in a cache; it can still be culled to
816 To get rid of a cookie, this function should be called.
822 If retire is non-zero, then the object will be marked for recycling, and all
823 copies of it will be removed from all active caches in which it is present.
824 Not only that but all child objects will also be retired.
826 If retire is zero, then the object may be available again when next the
830 The cookie's auxiliary data will be updated from aux_data if that is non-NULL
833 One very important note - relinquish must NOT be called for a cookie unless all
850 Sometimes it will be necessary to invalidate an object that contains data.
851 Typically this will be necessary when the server tells the netfs of a foreign
855 To indicate that a cache object should be invalidated, the following function
856 can be called:
860 This can be called with spinlocks held as it defers the work to a thread pool.
862 cancelled and discarded. Some future operations will be rejected until the
864 that, operations will be queued again behind the invalidation operation.
884 the cache must be informed if the page is going to go away. It's an indication
886 be a pointer to it, resources allocated or reserved for it, or I/O in progress
893 will be called on a page to get rid of it, even if PG_private is not set. This
894 allows caching to attempted on a page before read_cache_pages() to be called
899 can be used with a filesystem that uses the block buffering code.