filemap_writ...d_wait_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… filemap_write_and_wait_range β€” Kernel API Manual

okay bestie, so this one is a kernel API page (section 9, iykyk) and it's genuinely one of the more useful little gremlins in the mm family. It's filemap_write_and_wait_range, and yes the header truncates it to filemap_writ...d_wait_range(9) β€” that's just the man page being dramatic about column width, the real name is fine 🌸


✨ NAME ✨

filemap_write_and_wait_range β€” write out & wait on a file range

like, it writes the thing AND waits for it. both. at once. main character energy πŸŽ€


✨ SYNOPSIS ✨

int filemap_write_and_wait_range (struct address_space *mapping , loff_t
lstart , loff_t lend );

that's the whole vibe: it hands back an int, and it wants a mapping, an lstart, and an lend. no cap.


✨ ARGUMENTS ✨

  • mapping β€” the address_space for the pages πŸ¦‹ (this is the whole little world the pages live in)
  • lstart β€” offset in bytes where the range starts
  • lend β€” offset in bytes where the range ends (inclusive!! 🫢)

✨ DESCRIPTION ✨

Write out and wait upon file offsets lstart->lend, inclusive. literally the whole job. write them out, then wait on them. slay πŸ’…

⚠️ note that lend is inclusive (describes the last byte to be written) so that this function can be used to write to the very end-of-file (end = -1). that's the trick, bestie β€” the inclusive end is what makes this work for the actual end of the file, so don't go "fixing" it to be exclusive, that's not it 😭

✨ RETURN ✨

error status of the address space. that's it, that's the return value πŸ”₯


✨ SEE ALSO ✨

Kernel file ./mm/filemap.c β€” and okay this list is LONG so buckle up, here's every single one of them in order, no skipping, I would never πŸ™ˆ


and that's the whole page, bestie πŸ’– cute little sign-off time: this one lives in the ./mm source location and the page is dated October 2026 πŸ—“οΈβœ¨ go write and wait on your ranges, icon behavior only πŸ‘‘

πŸ“¦ where this page comes from