Lines Matching full:cache
2 FS-CACHE NETWORK FILESYSTEM API
5 There's an API by which a network filesystem can make use of the FS-Cache
10 FS-Cache to make finding objects faster and to make retiring of groups of
28 (5) Cache tag lookup
41 (18) FS-Cache specific page flags.
48 FS-Cache needs a description of the network filesystem. This is specified
67 entire in-cache hierarchy for this netfs will be scrapped and begun
95 their index hierarchies in quite the same way, FS-Cache tries to impose as few
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
108 controlled by cache tags (see below).
154 This defines an index, which is a special FS-Cache type.
167 (3) A function to select the cache in which to store an index [optional].
169 This function is invoked when an index needs to be instantiated in a cache
177 cache in the parent's list will be chosen, or failing that, the first
178 cache in the master list.
182 This function will be called to check that a match found in the cache for
185 whether the index entry in a cache is still valid.
188 cache are always valid.
190 The function is also passed the cache's idea of the object size and may
200 the cache and copy it into the netfs's structures.
205 The cache read/write functions are passed a context which is then passed
216 (6) A function to mark a page as retaining cache metadata [optional].
218 This is called by the cache to indicate that it is retaining in-memory
228 (7) A function to unmark all the pages retaining cache metadata [mandatory].
230 This is called by FS-Cache to indicate that a backing store is being
232 cleared to prevent confusion. Note that the cache will have torn down all
243 The first step is to declare the network filesystem to the cache. This also
264 CACHE TAG LOOKUP
267 FS-Cache permits the use of more than one cache. To permit particular index
268 subtrees to be bound to particular caches, the second step is to look up cache
270 FS-Cache as to which cache should be used. The problem with doing that is that
271 FS-Cache will always pick the first cache that was registered.
285 The tag will be retrieved by FS-Cache when it calls the object definition
293 The third step is to inform FS-Cache about part of an index hierarchy that can
314 An optional blob of auxiliary data that is to be stored within the cache can be
322 The cache tracks the size of the data attached to an object and this set to be
332 Note also that no indices are actually created in a cache until a non-index
344 cell->cache =
354 volume->cache =
355 fscache_acquire_cookie(volume->cell->cache,
366 The fourth step is to request a data file be created in the cache. This is
370 vnode->cache =
371 fscache_acquire_cookie(volume->cache,
383 the cache. This is almost identical to index cookie acquisition. The only
388 xattr->cache =
389 fscache_acquire_cookie(vnode->cache,
404 This doesn't automatically reserve any space in the cache, but permits the
405 cache to adjust its metadata for data tracking appropriately:
409 The cache will return -ENOBUFS if there is no backing cache or if there is no
410 space to allocate any extra metadata required in the cache.
412 Note that attempts to read or write data pages in the cache over this size may
424 And the sixth step is to store and retrieve pages in the cache. There are
434 (3) A page should only be written to the cache if previous read or allocated.
436 This permits the cache to maintain its page tracking in proper order.
442 Firstly, the netfs should ask FS-Cache to examine the caches and read the
466 Else if there's a copy of the page resident in the cache:
470 (2) The function will submit a request to read the data from the cache's
493 Otherwise, if there's not a copy available in cache, but the cache may be able
498 (2) A block may be reserved in the cache and attached to the object at the
504 read any data from the cache.
510 Alternatively, if there's not expected to be any data in the cache for a page
518 never reads from the cache. It will return 0 if a block has been allocated,
520 before writing to the cache.
531 written back to the cache:
550 Else if space can be allocated in the cache to hold this page:
554 (2) The function will submit a request to write the data to cache's backing
562 Else if there's no space available in the cache, -ENOBUFS will be returned. It
616 read from the cache and also not read from the underlying filesystem then
637 This function permits the cache to release any in-memory representation it
640 make sure the cache's in-memory tracking information gets torn down.
652 to see if a page is being written to the cache, and:
660 When releasepage() is being implemented, a special FS-Cache function exists to
662 conflict with the cache trying to write pages to the cache (which may itself
676 in which case the page will not be stored in the cache this time.
684 1:1 basis with the pages in the cache.
691 written to the cache and for the cache to finish with the page generally. No
700 cache, the following function can be called:
785 These operations permit data cookies to be pinned into the cache and to
789 isn't backed by a cache, -EOPNOTSUPP if the cache doesn't support pinning,
797 This permits a netfs to request cache space be reserved to store up to the
804 backed by a cache, -EOPNOTSUPP if the cache doesn't support reservations,
808 Note that this doesn't pin an object in a cache; it can still be culled to
831 so that the cache can lazily update it on disk.
855 To indicate that a cache object should be invalidated, the following function
863 cache has had a chance to insert a barrier in the operations queue. After
877 FS-CACHE SPECIFIC PAGE FLAG
880 FS-Cache makes use of a page flag, PG_private_2, for its own purpose. This is
883 PG_fscache is used to indicate that the page is known by the cache, and that
884 the cache must be informed if the page is going to go away. It's an indication
885 to the netfs that the cache has an interest in this page, where an interest may
898 This bit does not overlap with such as PG_private. This means that FS-Cache