95
95
the tree. The netfs can even mix indices and data files at the same level, but
96
96
it's not recommended.
98
Each index entry consists of a key of indeterminate length plus some auxilliary
98
Each index entry consists of a key of indeterminate length plus some auxiliary
99
99
data, also of indeterminate length.
101
101
There are some limits on indices:
204
204
If the function is absent, a file size of 0 is assumed.
206
(6) A function to retrieve auxilliary data from the netfs [optional].
206
(6) A function to retrieve auxiliary data from the netfs [optional].
208
208
This function will be called with the netfs data that was passed to the
209
cookie acquisition function and the maximum length of auxilliary data that
210
it may provide. It should write the auxilliary data into the given buffer
209
cookie acquisition function and the maximum length of auxiliary data that
210
it may provide. It should write the auxiliary data into the given buffer
211
211
and return the quantity it wrote.
213
If this function is absent, the auxilliary data length will be set to 0.
213
If this function is absent, the auxiliary data length will be set to 0.
215
The length of the auxilliary data buffer may be dependent on the key
215
The length of the auxiliary data buffer may be dependent on the key
216
216
length. A netfs mustn't rely on being able to provide more than 400 bytes
219
(7) A function to check the auxilliary data [optional].
219
(7) A function to check the auxiliary data [optional].
221
221
This function will be called to check that a match found in the cache for
222
this object is valid. For instance with AFS it could check the auxilliary
222
this object is valid. For instance with AFS it could check the auxiliary
223
223
data against the data version number returned by the server to determine
224
224
whether the index entry in a cache is still valid.
232
232
(*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update
233
233
(*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted
235
This function can also be used to extract data from the auxilliary data in
235
This function can also be used to extract data from the auxiliary data in
236
236
the cache and copy it into the netfs's structures.
238
238
(8) A pair of functions to manage contexts for the completion callback
673
673
in which case the page will not be stored in the cache this time.
676
BULK INODE PAGE UNCACHE
677
-----------------------
679
A convenience routine is provided to perform an uncache on all the pages
680
attached to an inode. This assumes that the pages on the inode correspond on a
681
1:1 basis with the pages in the cache.
683
void fscache_uncache_all_inode_pages(struct fscache_cookie *cookie,
684
struct inode *inode);
686
This takes the netfs cookie that the pages were cached with and the inode that
687
the pages are attached to. This function will wait for pages to finish being
688
written to the cache and for the cache to finish with the page generally. No
676
692
==========================
677
693
INDEX AND DATA FILE UPDATE
678
694
==========================