fscache_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Ύ NAME πŸ’Ύ

fscache_write β€” start a write to the cache. okay bestie, this is fscache_write(9) from the Kernel API Manual, and we are gonna get you comfy with it πŸ’–βœ¨


✨ SYNOPSIS ✨

the whole vibe-check signature, fr fr πŸ‘‘

int fscache_write (struct netfs_cache_resources *cres , loff_t start_pos
, struct iov_iter *iter , netfs_io_terminated_t term_func , void
*term_func_priv );

πŸŽ€ ARGUMENTS πŸŽ€

  • cres β€” the cache resources to use πŸ’…
  • start_pos β€” the beginning file offset in the cache file ✨
  • iter β€” the data to write, and also the length 🫢
  • term_func β€” the function to call upon completion πŸŽ€
  • term_func_priv β€” the private data for term_func πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, fscache_write starts a write to the cache. cres indicates the cache object to write to, and it must be obtained by a call to fscache_begin_operation beforehand. no cap, that part matters πŸ‘€πŸ”₯

The data to be written is obtained from the iterator, iter, and that also indicates the size of the operation. start_pos is the start position in the file. literally the coordinates of the whole thing πŸ’«

Upon termination of the operation, term_func will be called and supplied with term_func_priv plus the amount of data written, if successful, or the error code otherwise. so it gets the private data and the result β€” slay, that's the callback tea β˜•πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./include/linux/fscache.h β€” go peek, iykyk πŸ‘€


mwah πŸ’‹ that’s the whole page, bestie. signing off with fscache_write(9) Β· source/version: ./include/linux Β· date: October 2026 πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from