sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/filesystems/netfs_librarymodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/filesystems/netfs_librarymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/filesystems/netfs_librarymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/filesystems/netfs_librarymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/filesystems/netfs_librarymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/filesystems/netfs_librarymodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library.rsthKubhsection)}(hhh](htitle)}(h!Network Filesystem Helper Libraryh]h!Network Filesystem Helper Library}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hContents: - Overview. - Per-inode context. - Inode context helper functions. - Buffered read helpers. - Read helper functions. - Read helper structures. - Read helper operations. - Read helper procedure. - Read helper cache API.h]hContents: - Overview. - Per-inode context. - Inode context helper functions. - Buffered read helpers. - Read helper functions. - Read helper structures. - Read helper operations. - Read helper procedure. - Read helper cache API.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(hhh](h)}(hOverviewh]hOverview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXkThe network filesystem helper library is a set of functions designed to aid a network filesystem in implementing VM/VFS operations. For the moment, that just includes turning various VM buffered read operations into requests to read from the server. The helper library, however, can also interpose other services, such as local caching or local data encryption.h]hXkThe network filesystem helper library is a set of functions designed to aid a network filesystem in implementing VM/VFS operations. For the moment, that just includes turning various VM buffered read operations into requests to read from the server. The helper library, however, can also interpose other services, such as local caching or local data encryption.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hrNote that the library module doesn't link against local caching directly, so access must be provided by the netfs.h]htNote that the library module doesn’t link against local caching directly, so access must be provided by the netfs.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hPer-Inode Contexth]hPer-Inode Context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK"ubh)}(hThe network filesystem helper library needs a place to store a bit of state for its use on each netfs inode it is helping to manage. To this end, a context structure is defined::h]hThe network filesystem helper library needs a place to store a bit of state for its use on each netfs inode it is helping to manage. To this end, a context structure is defined:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjhhubh literal_block)}(hstruct netfs_inode { struct inode inode; const struct netfs_request_ops *ops; struct fscache_cookie *cache; };h]hstruct netfs_inode { struct inode inode; const struct netfs_request_ops *ops; struct fscache_cookie *cache; };}hj/sbah}(h]h ]h"]h$]h&]hhuh1j-hhhK(hjhhubh)}(hA network filesystem that wants to use netfs lib must place one of these in its inode wrapper struct instead of the VFS ``struct inode``. This can be done in a way similar to the following::h](hxA network filesystem that wants to use netfs lib must place one of these in its inode wrapper struct instead of the VFS }(hj=hhhNhNubhliteral)}(h``struct inode``h]h struct inode}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj=ubh6. This can be done in a way similar to the following:}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubj.)}(hgstruct my_inode { struct netfs_inode netfs; /* Netfslib context and vfs inode */ ... };h]hgstruct my_inode { struct netfs_inode netfs; /* Netfslib context and vfs inode */ ... };}hj_sbah}(h]h ]h"]h$]h&]hhuh1j-hhhK2hjhhubh)}(hThis allows netfslib to find its state by using ``container_of()`` from the inode pointer, thereby allowing the netfslib helper functions to be pointed to directly by the VFS/VM operation tables.h](h0This allows netfslib to find its state by using }(hjmhhhNhNubjF)}(h``container_of()``h]hcontainer_of()}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjmubh from the inode pointer, thereby allowing the netfslib helper functions to be pointed to directly by the VFS/VM operation tables.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubh)}(h,The structure contains the following fields:h]h,The structure contains the following fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubh block_quote)}(h* ``inode`` The VFS inode structure. * ``ops`` The set of operations provided by the network filesystem to netfslib. * ``cache`` Local caching cookie, or NULL if no caching is enabled. This field does not exist if fscache is disabled. h]h bullet_list)}(hhh](h list_item)}(h$``inode`` The VFS inode structure. h](h)}(h ``inode``h]jF)}(hjh]hinode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubh)}(hThe VFS inode structure.h]hThe VFS inode structure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hO``ops`` The set of operations provided by the network filesystem to netfslib. h](h)}(h``ops``h]jF)}(hjh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKAhjubh)}(hEThe set of operations provided by the network filesystem to netfslib.h]hEThe set of operations provided by the network filesystem to netfslib.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hw``cache`` Local caching cookie, or NULL if no caching is enabled. This field does not exist if fscache is disabled. h](h)}(h ``cache``h]jF)}(hj h]hcache}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubh)}(hjLocal caching cookie, or NULL if no caching is enabled. This field does not exist if fscache is disabled.h]hjLocal caching cookie, or NULL if no caching is enabled. This field does not exist if fscache is disabled.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhhhK=hjhhubh)}(hhh](h)}(hInode Context Helper Functionsh]hInode Context Helper Functions}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhKLubh)}(hTo help deal with the per-inode context, a number helper functions are provided. Firstly, a function to perform basic initialisation on a context and set the operations table pointer::h]hTo help deal with the per-inode context, a number helper functions are provided. Firstly, a function to perform basic initialisation on a context and set the operations table pointer:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjChhubj.)}(hjvoid netfs_inode_init(struct netfs_inode *ctx, const struct netfs_request_ops *ops);h]hjvoid netfs_inode_init(struct netfs_inode *ctx, const struct netfs_request_ops *ops);}hjbsbah}(h]h ]h"]h$]h&]hhuh1j-hhhKRhjChhubh)}(hKthen a function to cast from the VFS inode structure to the netfs context::h]hJthen a function to cast from the VFS inode structure to the netfs context:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjChhubj.)}(h4struct netfs_inode *netfs_node(struct inode *inode);h]h4struct netfs_inode *netfs_node(struct inode *inode);}hj~sbah}(h]h ]h"]h$]h&]hhuh1j-hhhKWhjChhubh)}(hand finally, a function to get the cache cookie pointer from the context attached to an inode (or NULL if fscache is disabled)::h]hand finally, a function to get the cache cookie pointer from the context attached to an inode (or NULL if fscache is disabled):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjChhubj.)}(h?struct fscache_cookie *netfs_i_cookie(struct netfs_inode *ctx);h]h?struct fscache_cookie *netfs_i_cookie(struct netfs_inode *ctx);}hjsbah}(h]h ]h"]h$]h&]hhuh1j-hhhK\hjChhubeh}(h]inode-context-helper-functionsah ]h"]inode context helper functionsah$]h&]uh1hhjhhhhhKLubeh}(h]per-inode-contextah ]h"]per-inode contextah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(hBuffered Read Helpersh]hBuffered Read Helpers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK`ubh)}(hThe library provides a set of read helpers that handle the ->read_folio(), ->readahead() and much of the ->write_begin() VM operations and translate them into a common call framework.h]hThe library provides a set of read helpers that handle the ->read_folio(), ->readahead() and much of the ->write_begin() VM operations and translate them into a common call framework.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubh)}(h$The following services are provided:h]h$The following services are provided:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjhhubj)}(hX8* Handle folios that span multiple pages. * Insulate the netfs from VM interface changes. * Allow the netfs to arbitrarily split reads up into pieces, even ones that don't match folio sizes or folio alignments and that may cross folios. * Allow the netfs to expand a readahead request in both directions to meet its needs. * Allow the netfs to partially fulfil a read, which will then be resubmitted. * Handle local caching, allowing cached data and server-read data to be interleaved for a single request. * Handle clearing of bufferage that isn't on the server. * Handle retrying of reads that failed, switching reads from the cache to the server as necessary. * In the future, this is a place that other services can be performed, such as local encryption of data to be stored remotely or in the cache. h]j)}(hhh](j)}(h(Handle folios that span multiple pages. h]h)}(h'Handle folios that span multiple pages.h]h'Handle folios that span multiple pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h.Insulate the netfs from VM interface changes. h]h)}(h-Insulate the netfs from VM interface changes.h]h-Insulate the netfs from VM interface changes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hAllow the netfs to arbitrarily split reads up into pieces, even ones that don't match folio sizes or folio alignments and that may cross folios. h]h)}(hAllow the netfs to arbitrarily split reads up into pieces, even ones that don't match folio sizes or folio alignments and that may cross folios.h]hAllow the netfs to arbitrarily split reads up into pieces, even ones that don’t match folio sizes or folio alignments and that may cross folios.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hTAllow the netfs to expand a readahead request in both directions to meet its needs. h]h)}(hSAllow the netfs to expand a readahead request in both directions to meet its needs.h]hSAllow the netfs to expand a readahead request in both directions to meet its needs.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj4ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hLAllow the netfs to partially fulfil a read, which will then be resubmitted. h]h)}(hKAllow the netfs to partially fulfil a read, which will then be resubmitted.h]hKAllow the netfs to partially fulfil a read, which will then be resubmitted.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjLubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhHandle local caching, allowing cached data and server-read data to be interleaved for a single request. h]h)}(hgHandle local caching, allowing cached data and server-read data to be interleaved for a single request.h]hgHandle local caching, allowing cached data and server-read data to be interleaved for a single request.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjdubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h7Handle clearing of bufferage that isn't on the server. h]h)}(h6Handle clearing of bufferage that isn't on the server.h]h8Handle clearing of bufferage that isn’t on the server.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj|ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(haHandle retrying of reads that failed, switching reads from the cache to the server as necessary. h]h)}(h`Handle retrying of reads that failed, switching reads from the cache to the server as necessary.h]h`Handle retrying of reads that failed, switching reads from the cache to the server as necessary.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hIn the future, this is a place that other services can be performed, such as local encryption of data to be stored remotely or in the cache. h]h)}(hIn the future, this is a place that other services can be performed, such as local encryption of data to be stored remotely or in the cache.h]hIn the future, this is a place that other services can be performed, such as local encryption of data to be stored remotely or in the cache.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhhhKhhjhhubh)}(hFrom the network filesystem, the helpers require a table of operations. This includes a mandatory method to issue a read operation along with a number of optional methods.h]hFrom the network filesystem, the helpers require a table of operations. This includes a mandatory method to issue a read operation along with a number of optional methods.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(hRead Helper Functionsh]hRead Helper Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h!Three read helpers are provided::h]h Three read helpers are provided:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj.)}(hXvoid netfs_readahead(struct readahead_control *ractl); int netfs_read_folio(struct file *file, struct folio *folio); int netfs_write_begin(struct netfs_inode *ctx, struct file *file, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **_folio, void **_fsdata);h]hXvoid netfs_readahead(struct readahead_control *ractl); int netfs_read_folio(struct file *file, struct folio *folio); int netfs_write_begin(struct netfs_inode *ctx, struct file *file, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **_folio, void **_fsdata);}hjsbah}(h]h ]h"]h$]h&]hhuh1j-hhhKhjhhubh)}(hkEach corresponds to a VM address space operation. These operations use the state in the per-inode context.h]hkEach corresponds to a VM address space operation. These operations use the state in the per-inode context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXYFor ->readahead() and ->read_folio(), the network filesystem just point directly at the corresponding read helper; whereas for ->write_begin(), it may be a little more complicated as the network filesystem might want to flush conflicting writes or track dirty data and needs to put the acquired folio if an error occurs after calling the helper.h]hXYFor ->readahead() and ->read_folio(), the network filesystem just point directly at the corresponding read helper; whereas for ->write_begin(), it may be a little more complicated as the network filesystem might want to flush conflicting writes or track dirty data and needs to put the acquired folio if an error occurs after calling the helper.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe helpers manage the read request, calling back into the network filesystem through the supplied table of operations. Waits will be performed as necessary before returning for helpers that are meant to be synchronous.h]hThe helpers manage the read request, calling back into the network filesystem through the supplied table of operations. Waits will be performed as necessary before returning for helpers that are meant to be synchronous.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIf an error occurs, the ->free_request() will be called to clean up the netfs_io_request struct allocated. If some parts of the request are in progress when an error occurs, the request will get partially completed if sufficient data is read.h]hIf an error occurs, the ->free_request() will be called to clean up the netfs_io_request struct allocated. If some parts of the request are in progress when an error occurs, the request will get partially completed if sufficient data is read.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hAdditionally, there is::h]hAdditionally, there is:}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj.)}(h* void netfs_subreq_terminated(struct netfs_io_subrequest *subreq, ssize_t transferred_or_error, bool was_async);h]h* void netfs_subreq_terminated(struct netfs_io_subrequest *subreq, ssize_t transferred_or_error, bool was_async);}hjQsbah}(h]h ]h"]h$]h&]hhuh1j-hhhKhjhhubh)}(hX(which should be called to complete a read subrequest. This is given the number of bytes transferred or a negative error code, plus a flag indicating whether the operation was asynchronous (ie. whether the follow-on processing can be done in the current context, given this may involve sleeping).h]hX(which should be called to complete a read subrequest. This is given the number of bytes transferred or a negative error code, plus a flag indicating whether the operation was asynchronous (ie. whether the follow-on processing can be done in the current context, given this may involve sleeping).}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]read-helper-functionsah ]h"]read helper functionsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hRead Helper Structuresh]hRead Helper Structures}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhKubh)}(hThe read helpers make use of a couple of structures to maintain the state of the read. The first is a structure that manages a read request as a whole::h]hThe read helpers make use of a couple of structures to maintain the state of the read. The first is a structure that manages a read request as a whole:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubj.)}(hXstruct netfs_io_request { struct inode *inode; struct address_space *mapping; struct netfs_cache_resources cache_resources; void *netfs_priv; loff_t start; size_t len; loff_t i_size; const struct netfs_request_ops *netfs_ops; unsigned int debug_id; ... };h]hXstruct netfs_io_request { struct inode *inode; struct address_space *mapping; struct netfs_cache_resources cache_resources; void *netfs_priv; loff_t start; size_t len; loff_t i_size; const struct netfs_request_ops *netfs_ops; unsigned int debug_id; ... };}hjsbah}(h]h ]h"]h$]h&]hhuh1j-hhhKhjuhhubh)}(h;The above fields are the ones the netfs can use. They are:h]h;The above fields are the ones the netfs can use. They are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubj)}(hX** ``inode`` * ``mapping`` The inode and the address space of the file being read from. The mapping may or may not point to inode->i_data. * ``cache_resources`` Resources for the local cache to use, if present. * ``netfs_priv`` The network filesystem's private data. The value for this can be passed in to the helper functions or set during the request. * ``start`` * ``len`` The file position of the start of the read request and the length. These may be altered by the ->expand_readahead() op. * ``i_size`` The size of the file at the start of the request. * ``netfs_ops`` A pointer to the operation table. The value for this is passed into the helper functions. * ``debug_id`` A number allocated to this operation that can be displayed in trace lines for reference. h]j)}(hhh](j)}(h ``inode``h]h)}(hjh]jF)}(hjh]hinode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h~``mapping`` The inode and the address space of the file being read from. The mapping may or may not point to inode->i_data. h](h)}(h ``mapping``h]jF)}(hjh]hmapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hpThe inode and the address space of the file being read from. The mapping may or may not point to inode->i_data.h]hpThe inode and the address space of the file being read from. The mapping may or may not point to inode->i_data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hG``cache_resources`` Resources for the local cache to use, if present. h](h)}(h``cache_resources``h]jF)}(hj h]hcache_resources}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h1Resources for the local cache to use, if present.h]h1Resources for the local cache to use, if present.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(h``netfs_priv`` The network filesystem's private data. The value for this can be passed in to the helper functions or set during the request. h](h)}(h``netfs_priv``h]jF)}(hj;h]h netfs_priv}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj9ubah}(h]h ]h"]h$]h&]uh1hhhhKhj5ubh)}(h~The network filesystem's private data. The value for this can be passed in to the helper functions or set during the request.h]hThe network filesystem’s private data. The value for this can be passed in to the helper functions or set during the request.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(h ``start``h]h)}(hjfh]jF)}(hjfh]hstart}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjhubah}(h]h ]h"]h$]h&]uh1hhhhKhjdubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h``len`` The file position of the start of the read request and the length. These may be altered by the ->expand_readahead() op. h](h)}(h``len``h]jF)}(hjh]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hxThe file position of the start of the read request and the length. These may be altered by the ->expand_readahead() op.h]hxThe file position of the start of the read request and the length. These may be altered by the ->expand_readahead() op.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(h>``i_size`` The size of the file at the start of the request. h](h)}(h ``i_size``h]jF)}(hjh]hi_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h1The size of the file at the start of the request.h]h1The size of the file at the start of the request.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hj``netfs_ops`` A pointer to the operation table. The value for this is passed into the helper functions. h](h)}(h ``netfs_ops``h]jF)}(hjh]h netfs_ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hZA pointer to the operation table. The value for this is passed into the helper functions.h]hZA pointer to the operation table. The value for this is passed into the helper functions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hh``debug_id`` A number allocated to this operation that can be displayed in trace lines for reference. h](h)}(h ``debug_id``h]jF)}(hjh]hdebug_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXA number allocated to this operation that can be displayed in trace lines for reference.h]hXA number allocated to this operation that can be displayed in trace lines for reference.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjuhhubh)}(hVThe second structure is used to manage individual slices of the overall read request::h]hUThe second structure is used to manage individual slices of the overall read request:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubj.)}(hXstruct netfs_io_subrequest { struct netfs_io_request *rreq; loff_t start; size_t len; size_t transferred; unsigned long flags; unsigned short debug_index; ... };h]hXstruct netfs_io_subrequest { struct netfs_io_request *rreq; loff_t start; size_t len; size_t transferred; unsigned long flags; unsigned short debug_index; ... };}hjZsbah}(h]h ]h"]h$]h&]hhuh1j-hhhKhjuhhubh)}(hEach subrequest is expected to access a single source, though the helpers will handle falling back from one source type to another. The members are:h]hEach subrequest is expected to access a single source, though the helpers will handle falling back from one source type to another. The members are:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubj)}(hX* ``rreq`` A pointer to the read request. * ``start`` * ``len`` The file position of the start of this slice of the read request and the length. * ``transferred`` The amount of data transferred so far of the length of this slice. The network filesystem or cache should start the operation this far into the slice. If a short read occurs, the helpers will call again, having updated this to reflect the amount read so far. * ``flags`` Flags pertaining to the read. There are two of interest to the filesystem or cache: * ``NETFS_SREQ_CLEAR_TAIL`` This can be set to indicate that the remainder of the slice, from transferred to len, should be cleared. * ``NETFS_SREQ_SEEK_DATA_READ`` This is a hint to the cache that it might want to try skipping ahead to the next data (ie. using SEEK_DATA). * ``debug_index`` A number allocated to this slice that can be displayed in trace lines for reference. h]j)}(hhh](j)}(h)``rreq`` A pointer to the read request. h](h)}(h``rreq``h]jF)}(hjh]hrreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubh)}(hA pointer to the read request.h]hA pointer to the read request.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubeh}(h]h ]h"]h$]h&]uh1jhjzubj)}(h ``start``h]h)}(hjh]jF)}(hjh]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubj)}(hZ``len`` The file position of the start of this slice of the read request and the length. h](h)}(h``len``h]jF)}(hjh]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPThe file position of the start of this slice of the read request and the length.h]hPThe file position of the start of this slice of the read request and the length.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjzubj)}(hX``transferred`` The amount of data transferred so far of the length of this slice. The network filesystem or cache should start the operation this far into the slice. If a short read occurs, the helpers will call again, having updated this to reflect the amount read so far. h](h)}(h``transferred``h]jF)}(hjh]h transferred}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXThe amount of data transferred so far of the length of this slice. The network filesystem or cache should start the operation this far into the slice. If a short read occurs, the helpers will call again, having updated this to reflect the amount read so far.h]hXThe amount of data transferred so far of the length of this slice. The network filesystem or cache should start the operation this far into the slice. If a short read occurs, the helpers will call again, having updated this to reflect the amount read so far.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjzubj)}(hX~``flags`` Flags pertaining to the read. There are two of interest to the filesystem or cache: * ``NETFS_SREQ_CLEAR_TAIL`` This can be set to indicate that the remainder of the slice, from transferred to len, should be cleared. * ``NETFS_SREQ_SEEK_DATA_READ`` This is a hint to the cache that it might want to try skipping ahead to the next data (ie. using SEEK_DATA). h](h)}(h ``flags``h]jF)}(hj0h]hflags}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj.ubah}(h]h ]h"]h$]h&]uh1hhhhM hj*ubh)}(hTFlags pertaining to the read. There are two of interest to the filesystem or cache:h]hTFlags pertaining to the read. There are two of interest to the filesystem or cache:}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubj)}(hhh](j)}(h``NETFS_SREQ_CLEAR_TAIL`` This can be set to indicate that the remainder of the slice, from transferred to len, should be cleared. h](h)}(h``NETFS_SREQ_CLEAR_TAIL``h]jF)}(hj\h]hNETFS_SREQ_CLEAR_TAIL}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjZubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubh)}(hhThis can be set to indicate that the remainder of the slice, from transferred to len, should be cleared.h]hhThis can be set to indicate that the remainder of the slice, from transferred to len, should be cleared.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubeh}(h]h ]h"]h$]h&]uh1jhjSubj)}(h``NETFS_SREQ_SEEK_DATA_READ`` This is a hint to the cache that it might want to try skipping ahead to the next data (ie. using SEEK_DATA). h](h)}(h``NETFS_SREQ_SEEK_DATA_READ``h]jF)}(hjh]hNETFS_SREQ_SEEK_DATA_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hlThis is a hint to the cache that it might want to try skipping ahead to the next data (ie. using SEEK_DATA).h]hlThis is a hint to the cache that it might want to try skipping ahead to the next data (ie. using SEEK_DATA).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhMhj*ubeh}(h]h ]h"]h$]h&]uh1jhjzubj)}(hg``debug_index`` A number allocated to this slice that can be displayed in trace lines for reference. h](h)}(h``debug_index``h]jF)}(hjh]h debug_index}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hTA number allocated to this slice that can be displayed in trace lines for reference.h]hTA number allocated to this slice that can be displayed in trace lines for reference.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhKhjvubah}(h]h ]h"]h$]h&]uh1jhhhKhjuhhubeh}(h]read-helper-structuresah ]h"]read helper structuresah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hRead Helper Operationsh]hRead Helper Operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubh)}(hThe network filesystem must provide the read helpers with a table of operations through which it can issue requests and negotiate::h]hThe network filesystem must provide the read helpers with a table of operations through which it can issue requests and negotiate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjhhubj.)}(hXxstruct netfs_request_ops { void (*init_request)(struct netfs_io_request *rreq, struct file *file); void (*free_request)(struct netfs_io_request *rreq); void (*expand_readahead)(struct netfs_io_request *rreq); bool (*clamp_length)(struct netfs_io_subrequest *subreq); void (*issue_read)(struct netfs_io_subrequest *subreq); bool (*is_still_valid)(struct netfs_io_request *rreq); int (*check_write_begin)(struct file *file, loff_t pos, unsigned len, struct folio **foliop, void **_fsdata); void (*done)(struct netfs_io_request *rreq); };h]hXxstruct netfs_request_ops { void (*init_request)(struct netfs_io_request *rreq, struct file *file); void (*free_request)(struct netfs_io_request *rreq); void (*expand_readahead)(struct netfs_io_request *rreq); bool (*clamp_length)(struct netfs_io_subrequest *subreq); void (*issue_read)(struct netfs_io_subrequest *subreq); bool (*is_still_valid)(struct netfs_io_request *rreq); int (*check_write_begin)(struct file *file, loff_t pos, unsigned len, struct folio **foliop, void **_fsdata); void (*done)(struct netfs_io_request *rreq); };}hj"sbah}(h]h ]h"]h$]h&]hhuh1j-hhhM'hjhhubh)}(hThe operations are as follows:h]hThe operations are as follows:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjhhubj)}(hXD * ``init_request()`` [Optional] This is called to initialise the request structure. It is given the file for reference. * ``free_request()`` [Optional] This is called as the request is being deallocated so that the filesystem can clean up any state it has attached there. * ``expand_readahead()`` [Optional] This is called to allow the filesystem to expand the size of a readahead read request. The filesystem gets to expand the request in both directions, though it's not permitted to reduce it as the numbers may represent an allocation already made. If local caching is enabled, it gets to expand the request first. Expansion is communicated by changing ->start and ->len in the request structure. Note that if any change is made, ->len must be increased by at least as much as ->start is reduced. * ``clamp_length()`` [Optional] This is called to allow the filesystem to reduce the size of a subrequest. The filesystem can use this, for example, to chop up a request that has to be split across multiple servers or to put multiple reads in flight. This should return 0 on success and an error code on error. * ``issue_read()`` [Required] The helpers use this to dispatch a subrequest to the server for reading. In the subrequest, ->start, ->len and ->transferred indicate what data should be read from the server. There is no return value; the netfs_subreq_terminated() function should be called to indicate whether or not the operation succeeded and how much data it transferred. The filesystem also should not deal with setting folios uptodate, unlocking them or dropping their refs - the helpers need to deal with this as they have to coordinate with copying to the local cache. Note that the helpers have the folios locked, but not pinned. It is possible to use the ITER_XARRAY iov iterator to refer to the range of the inode that is being operated upon without the need to allocate large bvec tables. * ``is_still_valid()`` [Optional] This is called to find out if the data just read from the local cache is still valid. It should return true if it is still valid and false if not. If it's not still valid, it will be reread from the server. * ``check_write_begin()`` [Optional] This is called from the netfs_write_begin() helper once it has allocated/grabbed the folio to be modified to allow the filesystem to flush conflicting state before allowing it to be modified. It may unlock and discard the folio it was given and set the caller's folio pointer to NULL. It should return 0 if everything is now fine (``*foliop`` left set) or the op should be retried (``*foliop`` cleared) and any other error code to abort the operation. * ``done`` [Optional] This is called after the folios in the request have all been unlocked (and marked uptodate if applicable). h]j)}(hhh](j)}(hx``init_request()`` [Optional] This is called to initialise the request structure. It is given the file for reference. h](h)}(h``init_request()``h]jF)}(hjKh]hinit_request()}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjIubah}(h]h ]h"]h$]h&]uh1hhhhM5hjEubh)}(hc[Optional] This is called to initialise the request structure. It is given the file for reference.h]hc[Optional] This is called to initialise the request structure. It is given the file for reference.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjEubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(h``free_request()`` [Optional] This is called as the request is being deallocated so that the filesystem can clean up any state it has attached there. h](h)}(h``free_request()``h]jF)}(hjzh]hfree_request()}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjxubah}(h]h ]h"]h$]h&]uh1hhhhM:hjtubh)}(h[Optional] This is called as the request is being deallocated so that the filesystem can clean up any state it has attached there.h]h[Optional] This is called as the request is being deallocated so that the filesystem can clean up any state it has attached there.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjtubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(hX``expand_readahead()`` [Optional] This is called to allow the filesystem to expand the size of a readahead read request. The filesystem gets to expand the request in both directions, though it's not permitted to reduce it as the numbers may represent an allocation already made. If local caching is enabled, it gets to expand the request first. Expansion is communicated by changing ->start and ->len in the request structure. Note that if any change is made, ->len must be increased by at least as much as ->start is reduced. h](h)}(h``expand_readahead()``h]jF)}(hjh]hexpand_readahead()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM?hjubh)}(hXC[Optional] This is called to allow the filesystem to expand the size of a readahead read request. The filesystem gets to expand the request in both directions, though it's not permitted to reduce it as the numbers may represent an allocation already made. If local caching is enabled, it gets to expand the request first.h]hXE[Optional] This is called to allow the filesystem to expand the size of a readahead read request. The filesystem gets to expand the request in both directions, though it’s not permitted to reduce it as the numbers may represent an allocation already made. If local caching is enabled, it gets to expand the request first.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubh)}(hExpansion is communicated by changing ->start and ->len in the request structure. Note that if any change is made, ->len must be increased by at least as much as ->start is reduced.h]hExpansion is communicated by changing ->start and ->len in the request structure. Note that if any change is made, ->len must be increased by at least as much as ->start is reduced.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(hX8``clamp_length()`` [Optional] This is called to allow the filesystem to reduce the size of a subrequest. The filesystem can use this, for example, to chop up a request that has to be split across multiple servers or to put multiple reads in flight. This should return 0 on success and an error code on error. h](h)}(h``clamp_length()``h]jF)}(hjh]hclamp_length()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubh)}(h[Optional] This is called to allow the filesystem to reduce the size of a subrequest. The filesystem can use this, for example, to chop up a request that has to be split across multiple servers or to put multiple reads in flight.h]h[Optional] This is called to allow the filesystem to reduce the size of a subrequest. The filesystem can use this, for example, to chop up a request that has to be split across multiple servers or to put multiple reads in flight.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubh)}(h;This should return 0 on success and an error code on error.h]h;This should return 0 on success and an error code on error.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(hX"``issue_read()`` [Required] The helpers use this to dispatch a subrequest to the server for reading. In the subrequest, ->start, ->len and ->transferred indicate what data should be read from the server. There is no return value; the netfs_subreq_terminated() function should be called to indicate whether or not the operation succeeded and how much data it transferred. The filesystem also should not deal with setting folios uptodate, unlocking them or dropping their refs - the helpers need to deal with this as they have to coordinate with copying to the local cache. Note that the helpers have the folios locked, but not pinned. It is possible to use the ITER_XARRAY iov iterator to refer to the range of the inode that is being operated upon without the need to allocate large bvec tables. h](h)}(h``issue_read()``h]jF)}(hj# h]h issue_read()}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj! ubah}(h]h ]h"]h$]h&]uh1hhhhMThj ubh)}(h[Required] The helpers use this to dispatch a subrequest to the server for reading. In the subrequest, ->start, ->len and ->transferred indicate what data should be read from the server.h]h[Required] The helpers use this to dispatch a subrequest to the server for reading. In the subrequest, ->start, ->len and ->transferred indicate what data should be read from the server.}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj ubh)}(hXpThere is no return value; the netfs_subreq_terminated() function should be called to indicate whether or not the operation succeeded and how much data it transferred. The filesystem also should not deal with setting folios uptodate, unlocking them or dropping their refs - the helpers need to deal with this as they have to coordinate with copying to the local cache.h]hXpThere is no return value; the netfs_subreq_terminated() function should be called to indicate whether or not the operation succeeded and how much data it transferred. The filesystem also should not deal with setting folios uptodate, unlocking them or dropping their refs - the helpers need to deal with this as they have to coordinate with copying to the local cache.}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj ubh)}(hNote that the helpers have the folios locked, but not pinned. It is possible to use the ITER_XARRAY iov iterator to refer to the range of the inode that is being operated upon without the need to allocate large bvec tables.h]hNote that the helpers have the folios locked, but not pinned. It is possible to use the ITER_XARRAY iov iterator to refer to the range of the inode that is being operated upon without the need to allocate large bvec tables.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hj ubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(h``is_still_valid()`` [Optional] This is called to find out if the data just read from the local cache is still valid. It should return true if it is still valid and false if not. If it's not still valid, it will be reread from the server. h](h)}(h``is_still_valid()``h]jF)}(hjn h]his_still_valid()}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjl ubah}(h]h ]h"]h$]h&]uh1hhhhMehjh ubh)}(h[Optional] This is called to find out if the data just read from the local cache is still valid. It should return true if it is still valid and false if not. If it's not still valid, it will be reread from the server.h]h[Optional] This is called to find out if the data just read from the local cache is still valid. It should return true if it is still valid and false if not. If it’s not still valid, it will be reread from the server.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjh ubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(hX``check_write_begin()`` [Optional] This is called from the netfs_write_begin() helper once it has allocated/grabbed the folio to be modified to allow the filesystem to flush conflicting state before allowing it to be modified. It may unlock and discard the folio it was given and set the caller's folio pointer to NULL. It should return 0 if everything is now fine (``*foliop`` left set) or the op should be retried (``*foliop`` cleared) and any other error code to abort the operation. h](h)}(h``check_write_begin()``h]jF)}(hj h]hcheck_write_begin()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhMkhj ubh)}(h[Optional] This is called from the netfs_write_begin() helper once it has allocated/grabbed the folio to be modified to allow the filesystem to flush conflicting state before allowing it to be modified.h]h[Optional] This is called from the netfs_write_begin() helper once it has allocated/grabbed the folio to be modified to allow the filesystem to flush conflicting state before allowing it to be modified.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhj ubh)}(hXIt may unlock and discard the folio it was given and set the caller's folio pointer to NULL. It should return 0 if everything is now fine (``*foliop`` left set) or the op should be retried (``*foliop`` cleared) and any other error code to abort the operation.h](hIt may unlock and discard the folio it was given and set the caller’s folio pointer to NULL. It should return 0 if everything is now fine (}(hj hhhNhNubjF)}(h ``*foliop``h]h*foliop}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubh( left set) or the op should be retried (}(hj hhhNhNubjF)}(h ``*foliop``h]h*foliop}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubh: cleared) and any other error code to abort the operation.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMqhj ubeh}(h]h ]h"]h$]h&]uh1jhjBubj)}(h``done`` [Optional] This is called after the folios in the request have all been unlocked (and marked uptodate if applicable). h](h)}(h``done``h]jF)}(hj h]hdone}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhMvhj ubh)}(hu[Optional] This is called after the folios in the request have all been unlocked (and marked uptodate if applicable).h]hu[Optional] This is called after the folios in the request have all been unlocked (and marked uptodate if applicable).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj ubeh}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhM5hj>ubah}(h]h ]h"]h$]h&]uh1jhhhM5hjhhubeh}(h]read-helper-operationsah ]h"]read helper operationsah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(hRead Helper Procedureh]hRead Helper Procedure}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj; hhhhhM~ubh)}(h9The read helpers work by the following general procedure:h]h9The read helpers work by the following general procedure:}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubj)}(hX* Set up the request. * For readahead, allow the local cache and then the network filesystem to propose expansions to the read request. This is then proposed to the VM. If the VM cannot fully perform the expansion, a partially expanded read will be performed, though this may not get written to the cache in its entirety. * Loop around slicing chunks off of the request to form subrequests: * If a local cache is present, it gets to do the slicing, otherwise the helpers just try to generate maximal slices. * The network filesystem gets to clamp the size of each slice if it is to be the source. This allows rsize and chunking to be implemented. * The helpers issue a read from the cache or a read from the server or just clears the slice as appropriate. * The next slice begins at the end of the last one. * As slices finish being read, they terminate. * When all the subrequests have terminated, the subrequests are assessed and any that are short or have failed are reissued: * Failed cache requests are issued against the server instead. * Failed server requests just fail. * Short reads against either source will be reissued against that source provided they have transferred some more data: * The cache may need to skip holes that it can't do DIO from. * If NETFS_SREQ_CLEAR_TAIL was set, a short read will be cleared to the end of the slice instead of reissuing. * Once the data is read, the folios that have been fully read/cleared: * Will be marked uptodate. * If a cache is present, will be marked with PG_fscache. * Unlocked * Any folios that need writing to the cache will then have DIO writes issued. * Synchronous operations will wait for reading to be complete. * Writes to the cache will proceed asynchronously and the folios will have the PG_fscache mark removed when that completes. * The request structures will be cleaned up when everything has completed. h]j)}(hhh](j)}(hSet up the request. h]h)}(hSet up the request.h]hSet up the request.}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhja ubah}(h]h ]h"]h$]h&]uh1jhj^ ubj)}(hX+For readahead, allow the local cache and then the network filesystem to propose expansions to the read request. This is then proposed to the VM. If the VM cannot fully perform the expansion, a partially expanded read will be performed, though this may not get written to the cache in its entirety. h]h)}(hX*For readahead, allow the local cache and then the network filesystem to propose expansions to the read request. This is then proposed to the VM. If the VM cannot fully perform the expansion, a partially expanded read will be performed, though this may not get written to the cache in its entirety.h]hX*For readahead, allow the local cache and then the network filesystem to propose expansions to the read request. This is then proposed to the VM. If the VM cannot fully perform the expansion, a partially expanded read will be performed, though this may not get written to the cache in its entirety.}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy ubah}(h]h ]h"]h$]h&]uh1jhj^ ubj)}(hXLoop around slicing chunks off of the request to form subrequests: * If a local cache is present, it gets to do the slicing, otherwise the helpers just try to generate maximal slices. * The network filesystem gets to clamp the size of each slice if it is to be the source. This allows rsize and chunking to be implemented. * The helpers issue a read from the cache or a read from the server or just clears the slice as appropriate. * The next slice begins at the end of the last one. * As slices finish being read, they terminate. h](h)}(hBLoop around slicing chunks off of the request to form subrequests:h]hBLoop around slicing chunks off of the request to form subrequests:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh](j)}(hsIf a local cache is present, it gets to do the slicing, otherwise the helpers just try to generate maximal slices. h]h)}(hrIf a local cache is present, it gets to do the slicing, otherwise the helpers just try to generate maximal slices.h]hrIf a local cache is present, it gets to do the slicing, otherwise the helpers just try to generate maximal slices.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hThe network filesystem gets to clamp the size of each slice if it is to be the source. This allows rsize and chunking to be implemented. h]h)}(hThe network filesystem gets to clamp the size of each slice if it is to be the source. This allows rsize and chunking to be implemented.h]hThe network filesystem gets to clamp the size of each slice if it is to be the source. This allows rsize and chunking to be implemented.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hkThe helpers issue a read from the cache or a read from the server or just clears the slice as appropriate. h]h)}(hjThe helpers issue a read from the cache or a read from the server or just clears the slice as appropriate.h]hjThe helpers issue a read from the cache or a read from the server or just clears the slice as appropriate.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h2The next slice begins at the end of the last one. h]h)}(h1The next slice begins at the end of the last one.h]h1The next slice begins at the end of the last one.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h-As slices finish being read, they terminate. h]h)}(h,As slices finish being read, they terminate.h]h,As slices finish being read, they terminate.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jhj^ ubj)}(hXWhen all the subrequests have terminated, the subrequests are assessed and any that are short or have failed are reissued: * Failed cache requests are issued against the server instead. * Failed server requests just fail. * Short reads against either source will be reissued against that source provided they have transferred some more data: * The cache may need to skip holes that it can't do DIO from. * If NETFS_SREQ_CLEAR_TAIL was set, a short read will be cleared to the end of the slice instead of reissuing. h](h)}(hzWhen all the subrequests have terminated, the subrequests are assessed and any that are short or have failed are reissued:h]hzWhen all the subrequests have terminated, the subrequests are assessed and any that are short or have failed are reissued:}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj* ubj)}(hhh](j)}(h=Failed cache requests are issued against the server instead. h]h)}(hstart and ->len in the subrequest indicate where and how big the next slice can be; the cache gets to reduce the length to match its granularity requirements. * ``read()`` [Required] Called to read from the cache. The start file offset is given along with an iterator to read to, which gives the length also. It can be given a hint requesting that it seek forward from that start position for data. Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context. * ``prepare_write()`` [Required] Called to prepare a write to the cache to take place. This involves checking to see whether the cache has sufficient space to honour the write. ``*_start`` and ``*_len`` indicate the region to be written; the region can be shrunk or it can be expanded to a page boundary either way as necessary to align for direct I/O. i_size holds the size of the object and is provided for reference. no_space_allocated_yet is set to true if the caller is certain that no data has been written to that region - for example if it tried to do a read from there already. * ``write()`` [Required] Called to write to the cache. The start file offset is given along with an iterator to write from, which gives the length also. Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context. * ``query_occupancy()`` [Required] Called to find out where the next piece of data is within a particular region of the cache. The start and length of the region to be queried are passed in, along with the granularity to which the answer needs to be aligned. The function passes back the start and length of the data, if any, available within that region. Note that there may be a hole at the front. It returns 0 if some data was found, -ENODATA if there was no usable data within the region or -ENOBUFS if there is no caching on this file. h]j)}(hhh](j)}(ha``end_operation()`` [Required] Called to clean up the resources at the end of the read request. h](h)}(h``end_operation()``h]jF)}(hja h]hend_operation()}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj_ ubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ ubh)}(hK[Required] Called to clean up the resources at the end of the read request.h]hK[Required] Called to clean up the resources at the end of the read request.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ ubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hX``expand_readahead()`` [Optional] Called at the beginning of a netfs_readahead() operation to allow the cache to expand a request in either direction. This allows the cache to size the request appropriately for the cache granularity. The function is passed pointers to the start and length in its parameters, plus the size of the file for reference, and adjusts the start and length appropriately. It should return one of: * ``NETFS_FILL_WITH_ZEROES`` * ``NETFS_DOWNLOAD_FROM_SERVER`` * ``NETFS_READ_FROM_CACHE`` * ``NETFS_INVALID_READ`` to indicate whether the slice should just be cleared or whether it should be downloaded from the server or read from the cache - or whether slicing should be given up at the current point. h](h)}(h``expand_readahead()``h]jF)}(hj h]hexpand_readahead()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(h[Optional] Called at the beginning of a netfs_readahead() operation to allow the cache to expand a request in either direction. This allows the cache to size the request appropriately for the cache granularity.h]h[Optional] Called at the beginning of a netfs_readahead() operation to allow the cache to expand a request in either direction. This allows the cache to size the request appropriately for the cache granularity.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hThe function is passed pointers to the start and length in its parameters, plus the size of the file for reference, and adjusts the start and length appropriately. It should return one of:h]hThe function is passed pointers to the start and length in its parameters, plus the size of the file for reference, and adjusts the start and length appropriately. It should return one of:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh](j)}(h``NETFS_FILL_WITH_ZEROES``h]h)}(hj h]jF)}(hj h]hNETFS_FILL_WITH_ZEROES}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h``NETFS_DOWNLOAD_FROM_SERVER``h]h)}(hj h]jF)}(hj h]hNETFS_DOWNLOAD_FROM_SERVER}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h``NETFS_READ_FROM_CACHE``h]h)}(hjh]jF)}(hjh]hNETFS_READ_FROM_CACHE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h``NETFS_INVALID_READ`` h]h)}(h``NETFS_INVALID_READ``h]jF)}(hj*h]hNETFS_INVALID_READ}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj(ubah}(h]h ]h"]h$]h&]uh1hhhhM hj$ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhM hj ubh)}(hto indicate whether the slice should just be cleared or whether it should be downloaded from the server or read from the cache - or whether slicing should be given up at the current point.h]hto indicate whether the slice should just be cleared or whether it should be downloaded from the server or read from the cache - or whether slicing should be given up at the current point.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(h``prepare_read()`` [Required] Called to configure the next slice of a request. ->start and ->len in the subrequest indicate where and how big the next slice can be; the cache gets to reduce the length to match its granularity requirements. h](h)}(h``prepare_read()``h]jF)}(hjeh]hprepare_read()}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjcubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubh)}(h[Required] Called to configure the next slice of a request. ->start and ->len in the subrequest indicate where and how big the next slice can be; the cache gets to reduce the length to match its granularity requirements.h]h[Required] Called to configure the next slice of a request. ->start and ->len in the subrequest indicate where and how big the next slice can be; the cache gets to reduce the length to match its granularity requirements.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hX``read()`` [Required] Called to read from the cache. The start file offset is given along with an iterator to read to, which gives the length also. It can be given a hint requesting that it seek forward from that start position for data. Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context. h](h)}(h ``read()``h]jF)}(hjh]hread()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h[Required] Called to read from the cache. The start file offset is given along with an iterator to read to, which gives the length also. It can be given a hint requesting that it seek forward from that start position for data.h]h[Required] Called to read from the cache. The start file offset is given along with an iterator to read to, which gives the length also. It can be given a hint requesting that it seek forward from that start position for data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hX)Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context.h]hX+Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller’s context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hXN``prepare_write()`` [Required] Called to prepare a write to the cache to take place. This involves checking to see whether the cache has sufficient space to honour the write. ``*_start`` and ``*_len`` indicate the region to be written; the region can be shrunk or it can be expanded to a page boundary either way as necessary to align for direct I/O. i_size holds the size of the object and is provided for reference. no_space_allocated_yet is set to true if the caller is certain that no data has been written to that region - for example if it tried to do a read from there already. h](h)}(h``prepare_write()``h]jF)}(hjh]hprepare_write()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubh)}(hX8[Required] Called to prepare a write to the cache to take place. This involves checking to see whether the cache has sufficient space to honour the write. ``*_start`` and ``*_len`` indicate the region to be written; the region can be shrunk or it can be expanded to a page boundary either way as necessary to align for direct I/O. i_size holds the size of the object and is provided for reference. no_space_allocated_yet is set to true if the caller is certain that no data has been written to that region - for example if it tried to do a read from there already.h](h[Required] Called to prepare a write to the cache to take place. This involves checking to see whether the cache has sufficient space to honour the write. }(hjhhhNhNubjF)}(h ``*_start``h]h*_start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubh and }(hjhhhNhNubjF)}(h ``*_len``h]h*_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubhX indicate the region to be written; the region can be shrunk or it can be expanded to a page boundary either way as necessary to align for direct I/O. i_size holds the size of the object and is provided for reference. no_space_allocated_yet is set to true if the caller is certain that no data has been written to that region - for example if it tried to do a read from there already.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hjubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hX``write()`` [Required] Called to write to the cache. The start file offset is given along with an iterator to write from, which gives the length also. Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context. h](h)}(h ``write()``h]jF)}(hj$h]hwrite()}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj"ubah}(h]h ]h"]h$]h&]uh1hhhhM1hjubh)}(h[Required] Called to write to the cache. The start file offset is given along with an iterator to write from, which gives the length also.h]h[Required] Called to write to the cache. The start file offset is given along with an iterator to write from, which gives the length also.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubh)}(hX)Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller's context.h]hX+Also provided is a pointer to a termination handler function and private data to pass to that function. The termination function should be called with the number of bytes transferred or an error code, plus a flag indicating whether the termination is definitely happening in the caller’s context.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjubeh}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hX ``query_occupancy()`` [Required] Called to find out where the next piece of data is within a particular region of the cache. The start and length of the region to be queried are passed in, along with the granularity to which the answer needs to be aligned. The function passes back the start and length of the data, if any, available within that region. Note that there may be a hole at the front. It returns 0 if some data was found, -ENODATA if there was no usable data within the region or -ENOBUFS if there is no caching on this file. h](h)}(h``query_occupancy()``h]jF)}(hjah]hquery_occupancy()}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj_ubah}(h]h ]h"]h$]h&]uh1hhhhM<hj[ubh)}(hXz[Required] Called to find out where the next piece of data is within a particular region of the cache. The start and length of the region to be queried are passed in, along with the granularity to which the answer needs to be aligned. The function passes back the start and length of the data, if any, available within that region. Note that there may be a hole at the front.h]hXz[Required] Called to find out where the next piece of data is within a particular region of the cache. The start and length of the region to be queried are passed in, along with the granularity to which the answer needs to be aligned. The function passes back the start and length of the data, if any, available within that region. Note that there may be a hole at the front.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj[ubh)}(hIt returns 0 if some data was found, -ENODATA if there was no usable data within the region or -ENOBUFS if there is no caching on this file.h]hIt returns 0 if some data was found, -ENODATA if there was no usable data within the region or -ENOBUFS if there is no caching on this file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj[ubeh}(h]h ]h"]h$]h&]uh1jhjX ubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhMhjT ubah}(h]h ]h"]h$]h&]uh1jhhhMhj hhubh)}(hNote that these methods are passed a pointer to the cache resource structure, not the read request structure as they could be used in other situations where there isn't a read request structure as well, such as writing dirty data to the cache.h]hNote that these methods are passed a pointer to the cache resource structure, not the read request structure as they could be used in other situations where there isn’t a read request structure as well, such as writing dirty data to the cache.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj hhubeh}(h]read-helper-cache-apiah ]h"]read helper cache apiah$]h&]uh1hhjhhhhhMubeh}(h]buffered-read-helpersah ]h"]buffered read helpersah$]h&]uh1hhhhhhhhK`ubh)}(hhh](h)}(hAPI Function Referenceh]hAPI Function Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMOubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single"folio_start_private_2 (C function)c.folio_start_private_2hNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h0void folio_start_private_2 (struct folio *folio)h]hdesc_signature_line)}(h/void folio_start_private_2(struct folio *folio)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhK$ubhdesc_sig_space)}(h h]h }(hj hhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhK$ubh desc_name)}(hfolio_start_private_2h]h desc_sig_name)}(hfolio_start_private_2h]hfolio_start_private_2}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhK$ubhdesc_parameterlist)}(h(struct folio *folio)h]hdesc_parameter)}(hstruct folio *folioh](hdesc_sig_keyword)}(hstructh]hstruct}(hjEhhhNhNubah}(h]h ]kah"]h$]h&]uh1jChj?ubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hhh]j)}(hfolioh]hfolio}(hjehhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjgmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}j|j"sbc.folio_start_private_2asbuh1hhj?ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubhdesc_sig_punctuation)}(hj<h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj?ubj)}(hfolioh]hfolio}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj9ubah}(h]h ]h"]h$]h&]hhuh1j7hjhhhjhK$ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhK$ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhK$hjhhubh desc_content)}(hhh]h)}(h/Start an fscache write on a folio. [DEPRECATED]h]h/Start an fscache write on a folio. [DEPRECATED]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK$ubeh}(h]h ](jzfunctioneh"]h$]h&]domainjzobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(h**Parameters** ``struct folio *folio`` The folio. **Description** Call this function before writing a folio to a local cache. Starting a second write before the first one finishes is not allowed. Note that this should no longer be used.h](h)}(h**Parameters**h]hstrong)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhK hjubhdefinition_list)}(hhh]hdefinition_list_item)}(h#``struct folio *folio`` The folio. h](hterm)}(h``struct folio *folio``h]jF)}(hj1h]hstruct folio *folio}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj/ubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhKhj)ubh definition)}(hhh]h)}(h The folio.h]h The folio.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKhjIubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hjFhKhj$ubah}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hjnh]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhKhjubh)}(hCall this function before writing a folio to a local cache. Starting a second write before the first one finishes is not allowed.h]hCall this function before writing a folio to a local cache. Starting a second write before the first one finishes is not allowed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhKhjubh)}(h(Note that this should no longer be used.h]h(Note that this should no longer be used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhK"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_inode (C function) c.netfs_inodehNtauh1jhjhhhNhNubj)}(hhh](j)}(h6struct netfs_inode * netfs_inode (struct inode *inode)h]j)}(h4struct netfs_inode *netfs_inode(struct inode *inode)h](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjhhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j)}(h netfs_inodeh]h netfs_inode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j| netfs_inodesb c.netfs_inodeasbuh1hhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(h netfs_inodeh]j)}(hjh]h netfs_inode}(hj!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjhhhjhMubj8)}(h(struct inode *inode)h]j>)}(hstruct inode *inodeh](jD)}(hjGh]hstruct}(hj<hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj8ubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubh)}(hhh]j)}(hinodeh]hinode}(hjZhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj\modnameN classnameNjj)}j]j c.netfs_inodeasbuh1hhj8ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hinodeh]hinode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj4ubah}(h]h ]h"]h$]h&]hhuh1j7hjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h*Get the netfs inode context from the inodeh]h*Get the netfs inode context from the inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct inode *inode`` The inode to query **Description** Get the netfs lib inode context from the network filesystem's inode. The context struct is expected to directly follow on from the VFS inode struct.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubj#)}(hhh]j()}(h+``struct inode *inode`` The inode to query h](j.)}(h``struct inode *inode``h]jF)}(hjh]hstruct inode *inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(hThe inode to queryh]hThe inode to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hj9h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubh)}(hGet the netfs lib inode context from the network filesystem's inode. The context struct is expected to directly follow on from the VFS inode struct.h]hGet the netfs lib inode context from the network filesystem’s inode. The context struct is expected to directly follow on from the VFS inode struct.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_inode_init (C function)c.netfs_inode_inithNtauh1jhjhhhNhNubj)}(hhh](j)}(hivoid netfs_inode_init (struct netfs_inode *ctx, const struct netfs_request_ops *ops, bool use_zero_point)h]j)}(hhvoid netfs_inode_init(struct netfs_inode *ctx, const struct netfs_request_ops *ops, bool use_zero_point)h](j)}(hvoidh]hvoid}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjhMubj)}(hnetfs_inode_inith]j)}(hnetfs_inode_inith]hnetfs_inode_init}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjzhhhjhMubj8)}(hS(struct netfs_inode *ctx, const struct netfs_request_ops *ops, bool use_zero_point)h](j>)}(hstruct netfs_inode *ctxh](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h netfs_inodeh]h netfs_inode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j|jsbc.netfs_inode_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(h#const struct netfs_request_ops *opsh](jD)}(hconsth]hconst}(hj-hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj)ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubjD)}(hjGh]hstruct}(hjIhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj)ubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubh)}(hhh]j)}(hnetfs_request_opsh]hnetfs_request_ops}(hjghhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjimodnameN classnameNjj)}j]jc.netfs_inode_initasbuh1hhj)ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hopsh]hops}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hbool use_zero_pointh](j)}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(huse_zero_pointh]huse_zero_point}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubeh}(h]h ]h"]h$]h&]hhuh1j7hjzhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjvhhhjhMubah}(h]jqah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjshhubj)}(hhh]h)}(h#Initialise a netfslib inode contexth]h#Initialise a netfslib inode context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjshhhjhMubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(hX\**Parameters** ``struct netfs_inode *ctx`` The netfs inode to initialise ``const struct netfs_request_ops *ops`` The netfs's operations list ``bool use_zero_point`` True to use the zero_point read optimisation **Description** Initialise the netfs library context struct. This is expected to follow on directly from the VFS inode struct.h](h)}(h**Parameters**h]j )}(hj!h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubj#)}(hhh](j()}(h:``struct netfs_inode *ctx`` The netfs inode to initialise h](j.)}(h``struct netfs_inode *ctx``h]jF)}(hj@h]hstruct netfs_inode *ctx}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj>ubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhj:ubjH)}(hhh]h)}(hThe netfs inode to initialiseh]hThe netfs inode to initialise}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjVubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hjUhMhj7ubj()}(hD``const struct netfs_request_ops *ops`` The netfs's operations list h](j.)}(h'``const struct netfs_request_ops *ops``h]jF)}(hjyh]h#const struct netfs_request_ops *ops}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjwubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjsubjH)}(hhh]h)}(hThe netfs's operations listh]hThe netfs’s operations list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjsubeh}(h]h ]h"]h$]h&]uh1j'hjhMhj7ubj()}(hE``bool use_zero_point`` True to use the zero_point read optimisation h](j.)}(h``bool use_zero_point``h]jF)}(hjh]hbool use_zero_point}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(h,True to use the zero_point read optimisationh]h,True to use the zero_point read optimisation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhj7ubeh}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubh)}(hoInitialise the netfs library context struct. This is expected to follow on directly from the VFS inode struct.h]hoInitialise the netfs library context struct. This is expected to follow on directly from the VFS inode struct.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_resize_file (C function)c.netfs_resize_filehNtauh1jhjhhhNhNubj)}(hhh](j)}(h[void netfs_resize_file (struct netfs_inode *ctx, loff_t new_i_size, bool changed_on_server)h]j)}(hZvoid netfs_resize_file(struct netfs_inode *ctx, loff_t new_i_size, bool changed_on_server)h](j)}(hvoidh]hvoid}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM ubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj@hM ubj)}(hnetfs_resize_fileh]j)}(hnetfs_resize_fileh]hnetfs_resize_file}(hjShhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjOubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhj.hhhj@hM ubj8)}(hD(struct netfs_inode *ctx, loff_t new_i_size, bool changed_on_server)h](j>)}(hstruct netfs_inode *ctxh](jD)}(hjGh]hstruct}(hjohhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjkubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hhh]j)}(h netfs_inodeh]h netfs_inode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j|jUsbc.netfs_resize_fileasbuh1hhjkubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjgubj>)}(hloff_t new_i_sizeh](h)}(hhh]j)}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]jc.netfs_resize_fileasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h new_i_sizeh]h new_i_size}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjgubj>)}(hbool changed_on_serverh](j)}(hjh]hbool}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hchanged_on_serverh]hchanged_on_server}(hjDhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjgubeh}(h]h ]h"]h$]h&]hhuh1j7hj.hhhj@hM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj*hhhj@hM ubah}(h]j%ah ](jjeh"]h$]h&]jj)jhuh1jhj@hM hj'hhubj)}(hhh]h)}(hNote that a file got resizedh]hNote that a file got resized}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjkhhubah}(h]h ]h"]h$]h&]uh1jhj'hhhj@hM ubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct netfs_inode *ctx`` The netfs inode being resized ``loff_t new_i_size`` The new file size ``bool changed_on_server`` The change was applied to the server **Description** Inform the netfs lib that a file got resized so that it can adjust its state.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubj#)}(hhh](j()}(h:``struct netfs_inode *ctx`` The netfs inode being resized h](j.)}(h``struct netfs_inode *ctx``h]jF)}(hjh]hstruct netfs_inode *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(hThe netfs inode being resizedh]hThe netfs inode being resized}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubj()}(h(``loff_t new_i_size`` The new file size h](j.)}(h``loff_t new_i_size``h]jF)}(hjh]hloff_t new_i_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(hThe new file sizeh]hThe new file size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubj()}(h@``bool changed_on_server`` The change was applied to the server h](j.)}(h``bool changed_on_server``h]jF)}(hj!h]hbool changed_on_server}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(h$The change was applied to the serverh]h$The change was applied to the server}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj7ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj6hMhjubeh}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hj\h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjZubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubh)}(hMInform the netfs lib that a file got resized so that it can adjust its state.h]hMInform the netfs lib that a file got resized so that it can adjust its state.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_i_cookie (C function)c.netfs_i_cookiehNtauh1jhjhhhNhNubj)}(hhh](j)}(h@struct fscache_cookie * netfs_i_cookie (struct netfs_inode *ctx)h]j)}(h>struct fscache_cookie *netfs_i_cookie(struct netfs_inode *ctx)h](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjhhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j)}(hfscache_cookieh]hfscache_cookie}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j|netfs_i_cookiesbc.netfs_i_cookieasbuh1hhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hnetfs_i_cookieh]j)}(hjh]hnetfs_i_cookie}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjhhhjhMubj8)}(h(struct netfs_inode *ctx)h]j>)}(hstruct netfs_inode *ctxh](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h netfs_inodeh]h netfs_inode}(hj9hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj;modnameN classnameNjj)}j]jc.netfs_i_cookieasbuh1hhjubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hctxh]hctx}(hjrhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubah}(h]h ]h"]h$]h&]hhuh1j7hjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h#Get the cache cookie from the inodeh]h#Get the cache cookie from the inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct netfs_inode *ctx`` The netfs inode to query **Description** Get the caching cookie (if enabled) from the network filesystem's inode.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubj#)}(hhh]j()}(h5``struct netfs_inode *ctx`` The netfs inode to query h](j.)}(h``struct netfs_inode *ctx``h]jF)}(hjh]hstruct netfs_inode *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubjH)}(hhh]h)}(hThe netfs inode to queryh]hThe netfs inode to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubh)}(hHGet the caching cookie (if enabled) from the network filesystem's inode.h]hJGet the caching cookie (if enabled) from the network filesystem’s inode.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*netfs_wait_for_outstanding_io (C function)c.netfs_wait_for_outstanding_iohNtauh1jhjhhhNhNubj)}(hhh](j)}(h8void netfs_wait_for_outstanding_io (struct inode *inode)h]j)}(h7void netfs_wait_for_outstanding_io(struct inode *inode)h](j)}(hvoidh]hvoid}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM*ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhjkhM*ubj)}(hnetfs_wait_for_outstanding_ioh]j)}(hnetfs_wait_for_outstanding_ioh]hnetfs_wait_for_outstanding_io}(hj~hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjzubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjYhhhjkhM*ubj8)}(h(struct inode *inode)h]j>)}(hstruct inode *inodeh](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hinodeh]hinode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j|jsbc.netfs_wait_for_outstanding_ioasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinodeh]hinode}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubah}(h]h ]h"]h$]h&]hhuh1j7hjYhhhjkhM*ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjUhhhjkhM*ubah}(h]jPah ](jjeh"]h$]h&]jj)jhuh1jhjkhM*hjRhhubj)}(hhh]h)}(h$Wait for outstanding I/O to completeh]h$Wait for outstanding I/O to complete}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM"hjhhubah}(h]h ]h"]h$]h&]uh1jhjRhhhjkhM*ubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjj5jj5jjjuh1jhhhjhNhNubj)}(hX@**Parameters** ``struct inode *inode`` The netfs inode to wait on **Description** Wait for outstanding I/O requests of any type to complete. This is intended to be called from inode eviction routines. This makes sure that any resources held by those requests are cleaned up before we let the inode get cleaned up.h](h)}(h**Parameters**h]j )}(hj?h]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM&hj9ubj#)}(hhh]j()}(h3``struct inode *inode`` The netfs inode to wait on h](j.)}(h``struct inode *inode``h]jF)}(hj^h]hstruct inode *inode}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj\ubah}(h]h ]h"]h$]h&]uh1j-h`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM#hjXubjH)}(hhh]h)}(hThe netfs inode to wait onh]hThe netfs inode to wait on}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM#hjtubah}(h]h ]h"]h$]h&]uh1jGhjXubeh}(h]h ]h"]h$]h&]uh1j'hjshM#hjUubah}(h]h ]h"]h$]h&]uh1j"hj9ubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM%hj9ubh)}(hWait for outstanding I/O requests of any type to complete. This is intended to be called from inode eviction routines. This makes sure that any resources held by those requests are cleaned up before we let the inode get cleaned up.h]hWait for outstanding I/O requests of any type to complete. This is intended to be called from inode eviction routines. This makes sure that any resources held by those requests are cleaned up before we let the inode get cleaned up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:593: ./include/linux/netfs.hhM%hj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_readahead (C function)c.netfs_readaheadhNtauh1jhjhhhNhNubj)}(hhh](j)}(h6void netfs_readahead (struct readahead_control *ractl)h]j)}(h5void netfs_readahead(struct readahead_control *ractl)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMQubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMQubj)}(hnetfs_readaheadh]j)}(hnetfs_readaheadh]hnetfs_readahead}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjhhhjhMQubj8)}(h!(struct readahead_control *ractl)h]j>)}(hstruct readahead_control *ractlh](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hreadahead_controlh]hreadahead_control}(hj9hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj;modnameN classnameNjj)}j]j)}j|jsbc.netfs_readaheadasbuh1hhjubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hractlh]hractl}(hjthhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubah}(h]h ]h"]h$]h&]hhuh1j7hjhhhjhMQubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMQubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMQhjhhubj)}(hhh]h)}(hHelper to manage a read requesth]hHelper to manage a read request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMChjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMQubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(hXu**Parameters** ``struct readahead_control *ractl`` The description of the readahead request **Description** Fulfil a readahead request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together. If necessary, the readahead window can be expanded in either direction to a more convenient alighment for RPC efficiency or to make storage in the cache feasible. The calling netfs must initialise a netfs context contiguous to the vfs inode before calling this. This is usable whether or not caching is enabled.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMGhjubj#)}(hhh]j()}(hM``struct readahead_control *ractl`` The description of the readahead request h](j.)}(h#``struct readahead_control *ractl``h]jF)}(hjh]hstruct readahead_control *ractl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-ѿhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMDhjubjH)}(hhh]h)}(h(The description of the readahead requesth]h(The description of the readahead request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMDhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMDhjubah}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMFhjubh)}(hXmFulfil a readahead request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together. If necessary, the readahead window can be expanded in either direction to a more convenient alighment for RPC efficiency or to make storage in the cache feasible.h]hXmFulfil a readahead request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together. If necessary, the readahead window can be expanded in either direction to a more convenient alighment for RPC efficiency or to make storage in the cache feasible.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMFhjubh)}(hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.h]hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMLhjubh)}(h1This is usable whether or not caching is enabled.h]h1This is usable whether or not caching is enabled.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_read_folio (C function)c.netfs_read_foliohNtauh1jhjhhhNhNubj)}(hhh](j)}(h=int netfs_read_folio (struct file *file, struct folio *folio)h]j)}(h)}(hstruct file *fileh](jD)}(hjGh]hstruct}(hjhhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjmodnameN classnameNjj)}j]j)}j|jsbc.netfs_read_folioasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hstruct folio *folioh](jD)}(hjGh]hstruct}(hj,hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj(ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubh)}(hhh]j)}(hfolioh]hfolio}(hjJhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjLmodnameN classnameNjj)}j]jc.netfs_read_folioasbuh1hhj(ubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(hj<h]h*}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(hfolioh]hfolio}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubeh}(h]h ]h"]h$]h&]hhuh1j7hjyhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjuhhhjhMubah}(h]jpah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjrhhubj)}(hhh]h)}(h%Helper to manage a read_folio requesth]h%Helper to manage a read_folio request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjrhhhjhMubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjjjjjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct file *file`` The file to read from ``struct folio *folio`` The folio to read **Description** Fulfil a read_folio request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together. The calling netfs must initialise a netfs context contiguous to the vfs inode before calling this. This is usable whether or not caching is enabled.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubj#)}(hhh](j()}(h,``struct file *file`` The file to read from h](j.)}(h``struct file *file``h]jF)}(hjh]hstruct file *file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubjH)}(hhh]h)}(hThe file to read fromh]hThe file to read from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubj()}(h*``struct folio *folio`` The folio to read h](j.)}(h``struct folio *folio``h]jF)}(hj'h]hstruct folio *folio}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj%ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj!ubjH)}(hhh]h)}(hThe folio to readh]hThe folio to read}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMhj=ubah}(h]h ]h"]h$]h&]uh1jGhj!ubeh}(h]h ]h"]h$]h&]uh1j'hj<hMhjubeh}(h]h ]h"]h$]h&]uh1j"hjubh)}(h**Description**h]j )}(hjbh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubh)}(hFulfil a read_folio request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together.h]hFulfil a read_folio request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubh)}(hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.h]hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubh)}(h1This is usable whether or not caching is enabled.h]h1This is usable whether or not caching is enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnetfs_write_begin (C function)c.netfs_write_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hint netfs_write_begin (struct netfs_inode *ctx, struct file *file, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **_folio, void **_fsdata)h]j)}(hint netfs_write_begin(struct netfs_inode *ctx, struct file *file, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **_folio, void **_fsdata)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMrubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMrubj)}(hnetfs_write_beginh]j)}(hnetfs_write_beginh]hnetfs_write_begin}(hjhhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhjhhhjhMrubj8)}(h(struct netfs_inode *ctx, struct file *file, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **_folio, void **_fsdata)h](j>)}(hstruct netfs_inode *ctxh](jD)}(hjGh]hstruct}(hj hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h netfs_inodeh]h netfs_inode}(hj hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj" modnameN classnameNjj)}j]j)}j|jsbc.netfs_write_beginasbuh1hhjubj)}(h h]h }(hj@ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hj<h]h*}(hjN hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hctxh]hctx}(hj[ hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hstruct file *fileh](jD)}(hjGh]hstruct}(hjt hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChjp ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp ubh)}(hhh]j)}(hfileh]hfile}(hj hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj modnameN classnameNjj)}j]j< c.netfs_write_beginasbuh1hhjp ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp ubj)}(hj<h]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp ubj)}(hfileh]hfile}(hj hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjp ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hstruct address_space *mappingh](jD)}(hjGh]hstruct}(hj hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h address_spaceh]h address_space}(hj!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj!modnameN classnameNjj)}j]j< c.netfs_write_beginasbuh1hhj ubj)}(h h]h }(hj !hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hj<h]h*}(hj.!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hmappingh]hmapping}(hj;!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(h loff_t posh](h)}(hhh]j)}(hloff_th]hloff_t}(hjW!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjT!ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjY!modnameN classnameNjj)}j]j< c.netfs_write_beginasbuh1hhjP!ubj)}(h h]h }(hju!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjP!ubj)}(hposh]hpos}(hj!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjP!ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hunsigned int lenh](j)}(hunsignedh]hunsigned}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hinth]hint}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hlenh]hlen}(hj!hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hstruct folio **_folioh](jD)}(hjGh]hstruct}(hj!hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j)}(hfolioh]hfolio}(hj "hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj "modnameN classnameNjj)}j]j< c.netfs_write_beginasbuh1hhj!ubj)}(h h]h }(hj)"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hj<h]h*}(hj7"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hj<h]h*}(hjD"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h_folioh]h_folio}(hjQ"hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubj>)}(hvoid **_fsdatah](j)}(hvoidh]hvoid}(hjj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf"ubj)}(h h]h }(hjx"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf"ubj)}(hj<h]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf"ubj)}(hj<h]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf"ubj)}(h_fsdatah]h_fsdata}(hj"hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjf"ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hjubeh}(h]h ]h"]h$]h&]hhuh1j7hjhhhjhMrubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMrubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMrhjhhubj)}(hhh]h)}(h*Helper to prepare for writing [DEPRECATED]h]h*Helper to prepare for writing [DEPRECATED]}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMRhj"hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMrubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjj"jj"jjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct netfs_inode *ctx`` The netfs context ``struct file *file`` The file to read from ``struct address_space *mapping`` The mapping to read from ``loff_t pos`` File position at which the write will begin ``unsigned int len`` The length of the write (may extend beyond the end of the folio chosen) ``struct folio **_folio`` Where to put the resultant folio ``void **_fsdata`` Place for the netfs to store a cookie **Description** Pre-read data for a write-begin request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together. The calling netfs must provide a table of operations, only one of which, issue_read, is mandatory. The check_write_begin() operation can be provided to check for and flush conflicting writes once the folio is grabbed and locked. It is passed a pointer to the fsdata cookie that gets returned to the VM to be passed to write_end. It is permitted to sleep. It should return 0 if the request should go ahead or it may return an error. It may also unlock and put the folio, provided it sets ``*foliop`` to NULL, in which case a return of 0 will cause the folio to be re-got and the process to be retried. The calling netfs must initialise a netfs context contiguous to the vfs inode before calling this. This is usable whether or not caching is enabled. Note that this should be considered deprecated and netfs_perform_write() used instead.h](h)}(h**Parameters**h]j )}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMVhj"ubj#)}(hhh](j()}(h.``struct netfs_inode *ctx`` The netfs context h](j.)}(h``struct netfs_inode *ctx``h]jF)}(hj #h]hstruct netfs_inode *ctx}(hj #hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj #ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMShj#ubjH)}(hhh]h)}(hThe netfs contexth]hThe netfs context}(hj$#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj #hMShj!#ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj #hMShj#ubj()}(h,``struct file *file`` The file to read from h](j.)}(h``struct file *file``h]jF)}(hjD#h]hstruct file *file}(hjF#hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjB#ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMThj>#ubjH)}(hhh]h)}(hThe file to read fromh]hThe file to read from}(hj]#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY#hMThjZ#ubah}(h]h ]h"]h$]h&]uh1jGhj>#ubeh}(h]h ]h"]h$]h&]uh1j'hjY#hMThj#ubj()}(h;``struct address_space *mapping`` The mapping to read from h](j.)}(h!``struct address_space *mapping``h]jF)}(hj}#h]hstruct address_space *mapping}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj{#ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMUhjw#ubjH)}(hhh]h)}(hThe mapping to read fromh]hThe mapping to read from}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMUhj#ubah}(h]h ]h"]h$]h&]uh1jGhjw#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hMUhj#ubj()}(h;``loff_t pos`` File position at which the write will begin h](j.)}(h``loff_t pos``h]jF)}(hj#h]h loff_t pos}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj#ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMVhj#ubjH)}(hhh]h)}(h+File position at which the write will beginh]h+File position at which the write will begin}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMVhj#ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hMVhj#ubj()}(h]``unsigned int len`` The length of the write (may extend beyond the end of the folio chosen) h](j.)}(h``unsigned int len``h]jF)}(hj#h]hunsigned int len}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj#ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMWhj#ubjH)}(hhh]h)}(hGThe length of the write (may extend beyond the end of the folio chosen)h]hGThe length of the write (may extend beyond the end of the folio chosen)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMWhj$ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj$hMWhj#ubj()}(h;``struct folio **_folio`` Where to put the resultant folio h](j.)}(h``struct folio **_folio``h]jF)}(hj($h]hstruct folio **_folio}(hj*$hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj&$ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMXhj"$ubjH)}(hhh]h)}(h Where to put the resultant folioh]h Where to put the resultant folio}(hjA$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=$hMXhj>$ubah}(h]h ]h"]h$]h&]uh1jGhj"$ubeh}(h]h ]h"]h$]h&]uh1j'hj=$hMXhj#ubj()}(h9``void **_fsdata`` Place for the netfs to store a cookie h](j.)}(h``void **_fsdata``h]jF)}(hja$h]hvoid **_fsdata}(hjc$hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj_$ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMYhj[$ubjH)}(hhh]h)}(h%Place for the netfs to store a cookieh]h%Place for the netfs to store a cookie}(hjz$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv$hMYhjw$ubah}(h]h ]h"]h$]h&]uh1jGhj[$ubeh}(h]h ]h"]h$]h&]uh1j'hjv$hMYhj#ubeh}(h]h ]h"]h$]h&]uh1j"hj"ubh)}(h**Description**h]j )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM[hj"ubh)}(hPre-read data for a write-begin request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together.h]hPre-read data for a write-begin request by drawing data from the cache if possible, or the netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests from different sources will get munged together.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM[hj"ubh)}(hbThe calling netfs must provide a table of operations, only one of which, issue_read, is mandatory.h]hbThe calling netfs must provide a table of operations, only one of which, issue_read, is mandatory.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM_hj"ubh)}(hXThe check_write_begin() operation can be provided to check for and flush conflicting writes once the folio is grabbed and locked. It is passed a pointer to the fsdata cookie that gets returned to the VM to be passed to write_end. It is permitted to sleep. It should return 0 if the request should go ahead or it may return an error. It may also unlock and put the folio, provided it sets ``*foliop`` to NULL, in which case a return of 0 will cause the folio to be re-got and the process to be retried.h](hXThe check_write_begin() operation can be provided to check for and flush conflicting writes once the folio is grabbed and locked. It is passed a pointer to the fsdata cookie that gets returned to the VM to be passed to write_end. It is permitted to sleep. It should return 0 if the request should go ahead or it may return an error. It may also unlock and put the folio, provided it sets }(hj$hhhNhNubjF)}(h ``*foliop``h]h*foliop}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj$ubhf to NULL, in which case a return of 0 will cause the folio to be re-got and the process to be retried.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMbhj"ubh)}(hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.h]hbThe calling netfs must initialise a netfs context contiguous to the vfs inode before calling this.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMjhj"ubh)}(h1This is usable whether or not caching is enabled.h]h1This is usable whether or not caching is enabled.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMmhj"ubh)}(hVNote that this should be considered deprecated and netfs_perform_write() used instead.h]hVNote that this should be considered deprecated and netfs_perform_write() used instead.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMohj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%netfs_buffered_read_iter (C function)c.netfs_buffered_read_iterhNtauh1jhjhhhNhNubj)}(hhh](j)}(hLssize_t netfs_buffered_read_iter (struct kiocb *iocb, struct iov_iter *iter)h]j)}(hKssize_t netfs_buffered_read_iter(struct kiocb *iocb, struct iov_iter *iter)h](h)}(hhh]j)}(hssize_th]hssize_t}(hjA%hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj>%ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetjC%modnameN classnameNjj)}j]j)}j|netfs_buffered_read_itersbc.netfs_buffered_read_iterasbuh1hhj:%hhhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMubj)}(h h]h }(hjc%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:%hhhjb%hMubj)}(hnetfs_buffered_read_iterh]j)}(hj_%h]hnetfs_buffered_read_iter}(hju%hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjq%ubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhj:%hhhjb%hMubj8)}(h+(struct kiocb *iocb, struct iov_iter *iter)h](j>)}(hstruct kiocb *iocbh](jD)}(hjGh]hstruct}(hj%hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubh)}(hhh]j)}(hkiocbh]hkiocb}(hj%hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj%modnameN classnameNjj)}j]j]%c.netfs_buffered_read_iterasbuh1hhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hj<h]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hiocbh]hiocb}(hj%hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj%ubj>)}(hstruct iov_iter *iterh](jD)}(hjGh]hstruct}(hj&hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj%ubj)}(h h]h }(hj &hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubh)}(hhh]j)}(hiov_iterh]hiov_iter}(hj&hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj &modnameN classnameNjj)}j]j]%c.netfs_buffered_read_iterasbuh1hhj%ubj)}(h h]h }(hj<&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hj<h]h*}(hjJ&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hiterh]hiter}(hjW&hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj%ubeh}(h]h ]h"]h$]h&]hhuh1j7hj:%hhhjb%hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj6%hhhjb%hMubah}(h]j1%ah ](jjeh"]h$]h&]jj)jhuh1jhjb%hMhj3%hhubj)}(hhh]h)}(h$Filesystem buffered I/O read routineh]h$Filesystem buffered I/O read routine}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj~&hhubah}(h]h ]h"]h$]h&]uh1jhj3%hhhjb%hMubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjj&jj&jjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct kiocb *iocb`` kernel I/O control block ``struct iov_iter *iter`` destination for the data read **Description** This is the ->read_iter() routine for all filesystems that can use the page cache directly. The IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn't prevent readahead. The IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned. **Return** * number of bytes copied, even for partial reads * negative error code (or 0 if IOCB_NOIO) if nothing was readh](h)}(h**Parameters**h]j )}(hj&h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubj#)}(hhh](j()}(h0``struct kiocb *iocb`` kernel I/O control block h](j.)}(h``struct kiocb *iocb``h]jF)}(hj&h]hstruct kiocb *iocb}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj&ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubjH)}(hhh]h)}(hkernel I/O control blockh]hkernel I/O control block}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hMhj&ubj()}(h8``struct iov_iter *iter`` destination for the data read h](j.)}(h``struct iov_iter *iter``h]jF)}(hj&h]hstruct iov_iter *iter}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj&ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubjH)}(hhh]h)}(hdestination for the data readh]hdestination for the data read}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj'hMhj&ubeh}(h]h ]h"]h$]h&]uh1j"hj&ubh)}(h**Description**h]j )}(hj6'h]h Description}(hj8'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubh)}(h[This is the ->read_iter() routine for all filesystems that can use the page cache directly.h]h[This is the ->read_iter() routine for all filesystems that can use the page cache directly.}(hjL'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubh)}(hThe IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn't prevent readahead.h]hThe IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn’t prevent readahead.}(hj['hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubh)}(hXThe IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned.h]hXThe IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned.}(hjj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM hj&ubh)}(h **Return**h]j )}(hj{'h]hReturn}(hj}'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjy'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj&ubj)}(hhh](j)}(h.number of bytes copied, even for partial readsh]h)}(hj'h]h.number of bytes copied, even for partial reads}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubj)}(h;negative error code (or 0 if IOCB_NOIO) if nothing was readh]h)}(hj'h]h;negative error code (or 0 if IOCB_NOIO) if nothing was read}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]j;j<uh1jhj'hMhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!netfs_file_read_iter (C function)c.netfs_file_read_iterhNtauh1jhjhhhNhNubj)}(hhh](j)}(hHssize_t netfs_file_read_iter (struct kiocb *iocb, struct iov_iter *iter)h]j)}(hGssize_t netfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)h](h)}(hhh]j)}(hssize_th]hssize_t}(hj'hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj'modnameN classnameNjj)}j]j)}j|netfs_file_read_itersbc.netfs_file_read_iterasbuh1hhj'hhhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM:ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'hhhj(hM:ubj)}(hnetfs_file_read_iterh]j)}(hj (h]hnetfs_file_read_iter}(hj!(hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj(ubah}(h]h ](j2j3eh"]h$]h&]hhuh1jhj'hhhj(hM:ubj8)}(h+(struct kiocb *iocb, struct iov_iter *iter)h](j>)}(hstruct kiocb *iocbh](jD)}(hjGh]hstruct}(hj<(hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj8(ubj)}(h h]h }(hjI(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8(ubh)}(hhh]j)}(hkiocbh]hkiocb}(hjZ(hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhjW(ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj\(modnameN classnameNjj)}j]j (c.netfs_file_read_iterasbuh1hhj8(ubj)}(h h]h }(hjx(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8(ubj)}(hj<h]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8(ubj)}(hiocbh]hiocb}(hj(hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj8(ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj4(ubj>)}(hstruct iov_iter *iterh](jD)}(hjGh]hstruct}(hj(hhhNhNubah}(h]h ]jPah"]h$]h&]uh1jChj(ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubh)}(hhh]j)}(hiov_iterh]hiov_iter}(hj(hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&] refdomainjzreftypej| reftargetj(modnameN classnameNjj)}j]j (c.netfs_file_read_iterasbuh1hhj(ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(hj<h]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(hiterh]hiter}(hj)hhhNhNubah}(h]h ]j+ah"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]noemphhhuh1j=hj4(ubeh}(h]h ]h"]h$]h&]hhuh1j7hj'hhhj(hM:ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj'hhhj(hM:ubah}(h]j'ah ](jjeh"]h$]h&]jj)jhuh1jhj(hM:hj'hhubj)}(hhh]h)}(hGeneric filesystem read routineh]hGeneric filesystem read routine}(hj-)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM&hj*)hhubah}(h]h ]h"]h$]h&]uh1jhj'hhhj(hM:ubeh}(h]h ](jzfunctioneh"]h$]h&]jjzjjE)jjE)jjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct kiocb *iocb`` kernel I/O control block ``struct iov_iter *iter`` destination for the data read **Description** This is the ->read_iter() routine for all filesystems that can use the page cache directly. The IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn't prevent readahead. The IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned. **Return** * number of bytes copied, even for partial reads * negative error code (or 0 if IOCB_NOIO) if nothing was readh](h)}(h**Parameters**h]j )}(hjO)h]h Parameters}(hjQ)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjM)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM*hjI)ubj#)}(hhh](j()}(h0``struct kiocb *iocb`` kernel I/O control block h](j.)}(h``struct kiocb *iocb``h]jF)}(hjn)h]hstruct kiocb *iocb}(hjp)hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjl)ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM'hjh)ubjH)}(hhh]h)}(hkernel I/O control blockh]hkernel I/O control block}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hM'hj)ubah}(h]h ]h"]h$]h&]uh1jGhjh)ubeh}(h]h ]h"]h$]h&]uh1j'hj)hM'hje)ubj()}(h8``struct iov_iter *iter`` destination for the data read h](j.)}(h``struct iov_iter *iter``h]jF)}(hj)h]hstruct iov_iter *iter}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj)ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM(hj)ubjH)}(hhh]h)}(hdestination for the data readh]hdestination for the data read}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hM(hj)ubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hj)hM(hje)ubeh}(h]h ]h"]h$]h&]uh1j"hjI)ubh)}(h**Description**h]j )}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM*hjI)ubh)}(h[This is the ->read_iter() routine for all filesystems that can use the page cache directly.h]h[This is the ->read_iter() routine for all filesystems that can use the page cache directly.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM*hjI)ubh)}(hThe IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn't prevent readahead.h]hThe IOCB_NOWAIT flag in iocb->ki_flags indicates that -EAGAIN shall be returned when no data can be read without waiting for I/O requests to complete; it doesn’t prevent readahead.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM-hjI)ubh)}(hXThe IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned.h]hXThe IOCB_NOIO flag in iocb->ki_flags indicates that no new I/O requests shall be made for the read or for readahead. When no data can be read, -EAGAIN shall be returned. When readahead would be triggered, a partial, possibly empty read shall be returned.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM1hjI)ubh)}(h **Return**h]j )}(hj'*h]hReturn}(hj)*hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM6hjI)ubj)}(hhh](j)}(h.number of bytes copied, even for partial readsh]h)}(hjB*h]h.number of bytes copied, even for partial reads}(hjD*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM6hj@*ubah}(h]h ]h"]h$]h&]uh1jhj=*ubj)}(h;negative error code (or 0 if IOCB_NOIO) if nothing was readh]h)}(hjZ*h]h;negative error code (or 0 if IOCB_NOIO) if nothing was read}(hj\*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/filesystems/netfs_library:594: ./fs/netfs/buffered_read.chM7hjX*ubah}(h]h ]h"]h$]h&]uh1jhj=*ubeh}(h]h ]h"]h$]h&]j;j<uh1jhjQ*hM6hjI)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]api-function-referenceah ]h"]api function referenceah$]h&]uh1hhhhhhhhMOubeh}(h]!network-filesystem-helper-libraryah ]h"]!network filesystem helper libraryah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj*error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j*j*j jjjjjjjjrjojjj8 j5 j j jjj*j*u nametypes}(j*j jjjjrjj8 j jj*uh}(j*hjhjjjjCjjjojjjuj5 jj j; jj j*jjjjjjqjvj%j*jjjPjUjjjpjujjj1%j6%j'j'u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.