Lines Matching full:to
21 The network filesystem helper library is a set of functions designed to aid a
23 just includes turning various VM buffered read operations into requests to read
44 * Allows the netfs to arbitrarily split reads up into pieces, even ones that
47 * Allows the netfs to expand a readahead request in both directions to meet
50 * Allows the netfs to partially fulfil a read, which will then be resubmitted.
52 * Handles local caching, allowing cached data and server-read data to be
57 * Handle retrying of reads that failed, switching reads from the cache to the
61 local encryption of data to be stored remotely or in the cache.
64 includes a mandatory method to issue a read operation along with a number of
90 Each corresponds to a VM operation, with the addition of a couple of parameters
95 A table of operations through which the helpers can talk to the filesystem.
105 little more complicated as the network filesystem might want to flush
106 conflicting writes or track dirty data and needs to put the acquired page if an
111 necessary before returning for helpers that are meant to be synchronous.
113 If an error occurs and netfs_priv is non-NULL, ops->cleanup() will be called to
123 which should be called to complete a read subrequest. This is given the number
132 The read helpers make use of a couple of structures to maintain the state of
154 may or may not point to inode->i_data.
158 Resources for the local cache to use, if present.
163 to the helper functions or set during the request. The ->cleanup() op will
178 A pointer to the operation table. The value for this is passed into the
183 A number allocated to this operation that can be displayed in trace lines
187 The second structure is used to manage individual slices of the overall read
200 Each subrequest is expected to access a single source, though the helpers will
201 handle falling back from one source type to another. The members are:
205 A pointer to the read request.
218 this to reflect the amount read so far.
222 Flags pertaining to the read. There are two of interest to the filesystem
227 This can be set to indicate that the remainder of the slice, from
228 transferred to len, should be cleared.
232 This is a hint to the cache that it might want to try skipping ahead to
237 A number allocated to this slice that can be displayed in trace lines for
265 [Optional] This is called to initialise the request structure. It is given
270 [Required] This is called by netfs_write_begin() to ask if the file is being
275 [Optional] This is called to ask the network filesystem to call into the
276 cache (if present) to initialise the caching state for this read. The netfs
278 something like fscache_begin_read_operation() to do this.
280 The cache gets to store its state in ->cache_resources and must set a table
289 [Optional] This is called to allow the filesystem to expand the size of a
290 readahead read request. The filesystem gets to expand the request in both
291 directions, though it's not permitted to reduce it as the numbers may
293 to expand the request first.
301 [Optional] This is called to allow the filesystem to reduce the size of a
302 subrequest. The filesystem can use this, for example, to chop up a request
303 that has to be split across multiple servers or to put multiple reads in
310 [Required] The helpers use this to dispatch a subrequest to the server for
315 called to indicate whether or not the operation succeeded and how much data
317 uptodate, unlocking them or dropping their refs - the helpers need to deal
318 with this as they have to coordinate with copying to the local cache.
321 to use the ITER_XARRAY iov iterator to refer to the range of the inode that
322 is being operated upon without the need to allocate large bvec tables.
326 [Optional] This is called to find out if the data just read from the local
333 allocated/grabbed the page to be modified to allow the filesystem to flush
334 conflicting state before allowing it to be modified.
337 regrabbed and any other error code to abort the operation.
358 * For readahead, allow the local cache and then the network filesystem to
359 propose expansions to the read request. This is then proposed to the VM.
361 be performed, though this may not get written to the cache in its entirety.
363 * Loop around slicing chunks off of the request to form subrequests:
365 * If a local cache is present, it gets to do the slicing, otherwise the
366 helpers just try to generate maximal slices.
368 * The network filesystem gets to clamp the size of each slice if it is to be
369 the source. This allows rsize and chunking to be implemented.
388 * The cache may need to skip holes that it can't do DIO from.
390 * If NETFS_SREQ_CLEAR_TAIL was set, a short read will be cleared to the
401 * Any pages that need writing to the cache will then have DIO writes issued.
403 * Synchronous operations will wait for reading to be complete.
405 * Writes to the cache will proceed asynchronously and the pages will have the
414 When implementing a local cache to be used by the read helpers, two things are
415 required: some way for the network filesystem to initialise the caching for a
416 read request and a table of operations for the helpers to call.
418 The network filesystem's ->begin_cache_operation() method is called to set up a
419 cache and this must call into the cache to do the work. If using fscache, for
425 passing in the request pointer and the cookie corresponding to the file.
427 The netfs_read_request object contains a place for the cache to hang its
472 [Required] Called to clean up the resources at the end of the read request.
476 [Optional] Called at the beginning of a netfs_readahead() operation to allow
477 the cache to expand a request in either direction. This allows the cache to
480 The function is passed poiners to the start and length in its parameters,
489 to indicate whether the slice should just be cleared or whether it should be
495 [Required] Called to configure the next slice of a request. ->start and
497 the cache gets to reduce the length to match its granularity requirements.
501 [Required] Called to read from the cache. The start file offset is given
502 along with an iterator to read to, which gives the length also. It can be
506 Also provided is a pointer to a termination handler function and private
507 data to pass to that function. The termination function should be called
514 [Required] Called to write to the cache. The start file offset is given
515 along with an iterator to write from, which gives the length also.
517 Also provided is a pointer to a termination handler function and private
518 data to pass to that function. The termination function should be called
523 Note that these methods are passed a pointer to the cache resource structure,
525 there isn't a read request structure as well, such as writing dirty data to the