• Home
  • Raw
  • Download

Lines Matching +full:data +full:- +full:mirror

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
17 (3) Barring the top-level index (one entry per cached netfs), the index
30 (7) Data file registration
32 (9) Setting the data file size
35 (12) Index and data file consistency
40 (17) Data file invalidation
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
92 a particular key - for instance to mirror the removal of an AFS volume.
95 their index hierarchies in quite the same way, FS-Cache tries to impose as few
97 the tree. The netfs can even mix indices and data files at the same level, but
101 data, also of indeterminate length.
105 (1) Any index containing non-index objects should be restricted to a single
110 (2) The entry data must be atomically journallable, so it is limited to about
133 const void *data,
154 This defines an index, which is a special FS-Cache type.
158 This defines an ordinary data file.
170 during the instantiation of a non-index object. Only the immediate index
171 parent for the non-index object will be queried. Any indices above that
173 need to be supplied for any non-index object or any index that will only
180 (4) A function to check the auxiliary data [optional].
184 data against the data version number returned by the server to determine
195 (*) FSCACHE_CHECKAUX_OKAY - the entry is okay as is
196 (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update
197 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted
199 This function can also be used to extract data from the auxiliary data in
213 required for indices as indices may not contain data. These functions may
218 This is called by the cache to indicate that it is retaining in-memory
220 it has finished. This does not indicate whether there's data on the disk
226 This function is not required for indices as they're not permitted data.
230 This is called by FS-Cache to indicate that a backing store is being
236 This function is not required for indices as they're not permitted data.
267 FS-Cache permits the use of more than one cache. To permit particular index
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
316 typically be used for storing coherency data.
322 The cache tracks the size of the data attached to an object and this set to be
324 ->check_aux() callback.
326 Note that this function never returns an error - all errors are handled
330 functions - see below).
332 Note also that no indices are actually created in a cache until a non-index
344 cell->cache =
347 cell->name, strlen(cell->name),
354 volume->cache =
355 fscache_acquire_cookie(volume->cell->cache,
357 &volume->vid, sizeof(volume->vid),
363 DATA FILE REGISTRATION
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,
375 vnode, vnode->status.size, true);
386 it would be some other type of object such as a data file.
388 xattr->cache =
389 fscache_acquire_cookie(vnode->cache,
391 &xattr->name, strlen(xattr->name),
393 xattr, strlen(xattr->val), true);
400 SETTING THE DATA FILE SIZE
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
412 Note that attempts to read or write data pages in the cache over this size may
413 be rebuffed with -ENOBUFS.
429 (1) A page should not be re-read or re-allocated without uncaching it first.
440 ---------
442 Firstly, the netfs should ask FS-Cache to examine the caches and read the
458 the page specified will have the data loaded into it (and is also used to
464 (1) The function will return -ENOBUFS.
470 (2) The function will submit a request to read the data from the cache's
477 (*) The netfs data supplied when the cookie was created.
487 data. fscache_readpages_cancel() may need to be called.
501 (3) The function will return -ENODATA.
503 This function may also return -ENOMEM or -EINTR, in which case it won't have
504 read any data from the cache.
508 -------------
510 Alternatively, if there's not expected to be any data in the cache for a page
519 rather than -ENODATA as the other would. One or the other must be performed
527 ----------
538 The cookie argument must specify a data file cookie, the page specified should
539 contain the data to be written (and is also used to specify the page number),
548 (1) The function will return -ENOBUFS.
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
570 ------------------
585 (1) Any page it can retrieve data for is removed from pages and nr_pages and
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
607 Note that a return of -ENODATA, -ENOBUFS or any other error does not preclude
613 ----------------------------
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.
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).
660 When releasepage() is being implemented, a special FS-Cache function exists to
675 storage request to complete, or it may attempt to cancel the storage request -
680 -----------------------
696 INDEX AND DATA FILE CONSISTENCY
699 To find out whether auxiliary data for an object is up to data within the
705 This will call back to the netfs to check whether the auxiliary data associated
706 with a cookie is correct; if aux_data is non-NULL, it will update the auxiliary
707 data buffer first. It returns 0 if it is and -ESTALE if it isn't; it may also
708 return -ENOMEM and -ERESTARTSYS.
710 To request an update of the index data for an index or other object, the
716 This function will update the cookie's auxiliary data buffer from aux_data if
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.
721 data blocks are added to a data file object.
730 invalidate its state; allocate, read or write backing pages - though it is
754 bool (*can_enable)(void *data),
755 void *data)
761 The optional can_enable() function is passed the data argument and returns a
767 The object's data size is updated from object_size and is passed to the
768 ->check_aux() function.
770 In both cases, the cookie's auxiliary data buffer is updated from aux_data if
771 that is non-NULL inside the enablement lock before proceeding.
785 These operations permit data cookies to be pinned into the cache and to
788 The pinning function will return 0 if successful, -ENOBUFS in the cookie
789 isn't backed by a cache, -EOPNOTSUPP if the cache doesn't support pinning,
790 -ENOSPC if there isn't enough space to honour the operation, -ENOMEM or
791 -EIO if there's any other problem.
793 (*) Data space reservation:
803 The function will return 0 if successful, -ENOBUFS in the cookie isn't
804 backed by a cache, -EOPNOTSUPP if the cache doesn't support reservations,
805 -ENOSPC if there isn't enough space to honour the operation, -ENOMEM or
806 -EIO if there's any other problem.
822 If retire is non-zero, then the object will be marked for recycling, and all
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
847 DATA FILE INVALIDATION
850 Sometimes it will be necessary to invalidate an object that contains data.
852 change - at which point the netfs has to throw away all the state it had for an
867 auxiliary data update operation as it is very likely these will have changed.
877 FS-CACHE SPECIFIC PAGE FLAG
880 FS-Cache makes use of a page flag, PG_private_2, for its own purpose. This is
898 This bit does not overlap with such as PG_private. This means that FS-Cache