Lines Matching +full:data +full:- +full:size
1 .. SPDX-License-Identifier: GPL-2.0
10 (1) A cache is logically organised into volumes and data storage objects
13 (2) Volumes and data storage objects are represented by various types of
18 (4) Cookies have coherency data that allows a cache to determine if the
19 cached data is still valid.
31 (3) Data file registration
33 (5) Resizing a data file (truncation)
34 (6) Data I/O API
35 (7) Data file coherency
36 (8) Data file invalidation
47 represents "data storage objects". These are represented by two types of
55 maximum size of a filename component (allowing the cache backend one char for
104 and notes the coherency data.
116 The specified coherency data is stored in the cookie and will be matched
117 against coherency data stored on disk. The data pointer may be NULL if no data
118 is provided. If the coherency data doesn't match, the entire cache volume will
136 coherency data will be set to the value supplied. The amount of coherency data
138 data cookies obtained in this volume must be relinquished before the volume is
142 Data File Registration
146 cookie for data storage::
163 The caller should also pass in a piece of coherency data in aux_data. A buffer
164 of size aux_data_len will be allocated and the coherency data copied in. It is
165 assumed that the size is invariant over time. The coherency data is used to
166 check the validity of data in the cache. Functions are provided by which the
167 coherency data can be updated.
169 The file size of the object being cached should also be provided. This may be
170 used to trim the data and will be stored with the coherency data.
188 Marking A Cookie In-Use
204 needs to access/store data in the cache. This is done in the background, and
208 It optionally updates the stored coherency data and object size and then
209 decreases the in-use counter. When the last user unuses the cookie, it is
213 A cookie must be marked in-use before it can be accessed for read, write or
214 resize - and an in-use mark must be kept whilst there is dirty data in the
218 Note that in-use marks are cumulative. For each time a cookie is marked
219 in-use, it must be unused.
222 Resizing A Data File (Truncation)
231 The caller must have first marked the cookie in-use. The cookie and the new
232 size are passed in and the cache is synchronously resized. This is expected to
233 be called from ``->setattr()`` inode operation under the inode lock.
236 Data I/O API
239 To do data I/O operations directly through a cookie, the following functions
258 (for instance, it will return -ENOBUFS if given a NULL cookie, but otherwise do
261 The *read* and *write* functions initiate a direct-IO operation. Both take the
264 data.
289 Data File Coherency
292 To request an update of the coherency data and file size on a cookie, the
299 This will update the cookie's coherency data and/or file size.
302 Data File Invalidation
305 Sometimes it will be necessary to invalidate an object that contains data.
307 of a remote third-party change - at which point the filesystem has to throw
308 away the state and cached data that it had for an file and reload from the
316 loff_t size,
320 reads to fail with -ESTALE, sets the coherency data and file size from the
322 go and get rid of the old data.
328 Write-Back Resource Management
331 To write data to the cache from network filesystem writeback, the cache
339 in-use is held on the cookie for this inode. It can only be changed if the
369 up any hanging ``I_PINNING_FSCACHE_WB``. It also allows the coherency data to
376 If a network filesystem has locally modified data that it wants to write to the
379 (presumably due to an already in-progress operation). This prevents multiple
412 attached is passed in and start and len indicate the size of the region that's
419 the cache object to be written to, i_size indicates the size of the netfs file
430 Fscache keeps track of whether we have any data in the cache yet for a cache
452 .. kernel-doc:: include/linux/fscache.h