Lines Matching full:be

59 This first two fields should be filled in before registration, and the third
60 will be filled in by the registration function; any other fields should just be
68 entire in-cache hierarchy for this netfs will be scrapped and begun
71 (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
120 To define an object, a structure of the following type should be filled out::
165 This function is invoked when an index needs to be instantiated in a cache
167 parent for the non-index object will be queried. Any indices above that
168 in the hierarchy may be stored in multiple caches. This function does not
169 need to be supplied for any non-index object or any index that will only
173 cache in the parent's list will be chosen, or failing that, the first
178 This function will be called to check that a match found in the cache for
183 If this function is absent, it will be assumed that matching objects in a
198 - the entry should be deleted
200 This function can also be used to extract data from the auxiliary data in
208 valid until after the I/O completion is called, two functions may be
215 be called in interrupt context and so may not sleep.
222 or not. Note that several pages at once may be presented for marking.
224 The PG_fscache bit is set on the pages before this function would be
225 called, so the function need not be provided if this is sufficient.
232 unbound from a cookie and that all the marks on the pages should be
234 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
267 subtrees to be bound to particular caches, the second step is to look up cache
268 representation tags. This step is optional; it can be left entirely up to
269 FS-Cache as to which cache should be used. The problem with doing that is that
280 Any representation so obtained must be released by passing it to this function::
284 The tag will be retrieved by FS-Cache when it calls the object definition
292 be used to locate files. This is done by requesting a cookie for each index in
309 A unique key that represents the object within the parent must be pointed to by
312 An optional blob of auxiliary data that is to be stored within the cache can be
313 pointed to with aux_data and should be of length aux_data_len. This would
314 typically be used for storing coherency data.
316 The netfs may pass an arbitrary value in netfs_data and this will be presented
317 to it in the event of any calling back. This may also be used in tracing or
320 The cache tracks the size of the data attached to an object and this set to be
321 object_size. For indices, this should be 0. This value will be passed to the
331 object needs to be created somewhere down the hierarchy. Furthermore, an index
332 may be created in several different caches independently at different times.
335 A cookie will be created in the disabled state if enabled is false. A cookie
336 must be enabled to do anything with it. A disabled cookie can be enabled by
339 For example, with AFS, a cell would be added to the primary index. This index
349 And then a particular volume could be added to that index by ID, creating
363 The fourth step is to request a data file be created in the cache. This is
365 the object definition should be something other than index type::
378 An optional step is to request an object of miscellaneous type be created in
380 difference is that the type in the object definition should be something other
381 than index type. While the parent object could be an index, it's more likely
382 it would be some other type of object such as a data file::
391 Miscellaneous objects might be used to store extended attributes or directory
408 be rebuffed with -ENOBUFS.
423 (1) A page should not be re-read or re-allocated without uncaching it first.
425 (2) A read or allocated page must be uncached when the netfs page is released
428 (3) A page should only be written to the cache if previous read or allocated.
462 (1) The mark_pages_cached() cookie operation will be called on that page.
469 (4) When the read is complete, end_io_func() will be invoked with:
475 * The context argument passed to the above function. This will be
480 If an error occurs, it should be assumed that the page contains no usable
481 data. fscache_readpages_cancel() may need to be called.
483 end_io_func() will be called in process context if the read is results in
484 an error, but it might be called in interrupt context if the read is
487 Otherwise, if there's not a copy available in cache, but the cache may be able
490 (1) The mark_pages_cached() cookie operation will be called on that page.
492 (2) A block may be reserved in the cache and attached to the object at the
504 Alternatively, if there's not expected to be any data in the cache for a page
505 because the file has been extended, a block can simply be allocated instead::
513 rather than -ENODATA as the other would. One or the other must be performed
516 The mark_pages_cached() cookie operation will be called on the page if
524 initial download or if a user performs a write), then the page should be
533 contain the data to be written (and is also used to specify the page number),
544 Else if space can be allocated in the cache to hold this page:
546 (1) PG_fscache_write will be set on the page.
554 anyone waiting for that bit will be woken up.
556 Else if there's no space available in the cache, -ENOBUFS will be returned. It
557 is also possible for the PG_fscache_write bit to be cleared when no write took
581 be merged for greater efficiency.
583 (2) The mark_pages_cached() cookie operation will be called on several pages
586 (3) If there was an general error, then that error will be returned.
588 Else if some pages couldn't be allocated or read, then -ENOBUFS will be
591 Else if some pages couldn't be read but were allocated, then -ENODATA will
592 be returned.
594 Otherwise, if all pages had reads dispatched, then 0 will be returned, the
595 list will be empty and ``*nr_pages`` will be 0.
597 (4) end_io_func will be called once for each page being read as the reads
598 complete. It will be called in process context if error != 0, but it may
599 be called in interrupt context if there is no error.
611 those pages will need to have any marks and reservations removed. This can be
617 prior to returning to the caller. The cookie argument should be as passed to
618 fscache_read_or_alloc_pages(). Every page in the pages list will be examined
619 and any that have PG_fscache set will be uncached.
625 To uncache a page, this function should be called::
631 might be holding for this netfs page. This function must be called once for
635 Note that pages can't be explicitly deleted from the a data file. The whole
636 data file must be retired (see the relinquish cookie function below).
663 releasepage(). It will return false if the page cannot be released yet for
664 some reason and if it returns true, the page has been uncached and can now be
669 in which case the page will not be stored in the cache this time.
692 cache, the following function can be called::
703 following function should be called::
709 that is non-NULL and then schedule this to be stored on disk. The update
710 method in the parent index definition will be called to transfer the data.
725 can be enabled or disabled later. To disable a cookie, call::
740 Cookies can be enabled or reenabled with::
753 ruling as to whether or not enablement should actually be permitted to begin.
755 All possible failures are handled internally. The cookie will only be marked
768 There are a number of operations that can be used to control cookies:
775 These operations permit data cookies to be pinned into the cache and to
787 This permits a netfs to request cache space be reserved to store up to the
791 If size is given as zero then the reservation will be cancelled.
798 Note that this doesn't pin an object in a cache; it can still be culled to
805 To get rid of a cookie, this function should be called::
811 If retire is non-zero, then the object will be marked for recycling, and all
812 copies of it will be removed from all active caches in which it is present.
813 Not only that but all child objects will also be retired.
815 If retire is zero, then the object may be available again when next the
819 The cookie's auxiliary data will be updated from aux_data if that is non-NULL
822 One very important note - relinquish must NOT be called for a cookie unless all
837 Sometimes it will be necessary to invalidate an object that contains data.
838 Typically this will be necessary when the server tells the netfs of a foreign
842 To indicate that a cache object should be invalidated, the following function
843 can be called::
847 This can be called with spinlocks held as it defers the work to a thread pool.
849 cancelled and discarded. Some future operations will be rejected until the
851 that, operations will be queued again behind the invalidation operation.
870 the cache must be informed if the page is going to go away. It's an indication
872 be a pointer to it, resources allocated or reserved for it, or I/O in progress
879 will be called on a page to get rid of it, even if PG_private is not set. This
880 allows caching to attempted on a page before read_cache_pages() to be called
885 can be used with a filesystem that uses the block buffering code.