netfs_perform_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netfs_perform_write β€” like, the Kernel API Manual girlies know πŸ’…

okay so bestie, today's main character is netfs_perform_write(9) from the Kernel API Manual, and she is literally out here copying data into the pagecache. no cap. let's get into it 🫢


✨ NAME ✨

netfs_perform_write β€” copy data into the pagecache. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS 🌸

ssize_t netfs_perform_write (struct kiocb *iocb , struct iov_iter *iter
, struct netfs_group *netfs_group );

look at her. three args. iconic behavior only πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • iocb β€” the operation parameters, aka the whole entire vibe of the write. she's the blueprint ✨
  • iter β€” the source buffer. this is where the data is actually coming from, bestie πŸ“
  • netfs_group β€” the grouping for dirty folios (eg. ceph snaps). yes she groups. she organizes. she's that girl πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So what does she do? She copies data into pagecache folios attached to the inode specified by iocb. Simple. Clean. Gorgeous. 🌈

⚠️ But listen β€” the caller must hold appropriate inode locks. Do not skip this. This is not a suggestion, this is a requirement, and she WILL know if you skipped it 😭

Now for the lore 🧚 Dirty folios get tagged with a netfs_folio struct if they're not up to date β€” that tag is there to indicate the range modified. Like a little sticky note saying "hey, this part changed" πŸŽ€

Dirty folios may also be tagged with a netfs-specific grouping, such that data from an old group gets flushed before a new one is started. old group out, new group in. slay πŸ’€βœ¨


πŸ’œ SEE ALSO πŸ’œ

go read those too, bestie, you won't regret it πŸ‘‘


and that's the whole page, fr fr 🫢 this little gem lives in ./fs/netfs, dated October 2026, and she goes by netfs_perform_write(9) β€” mwah, no notes, periodt πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from