folio_fill_tail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_fill_tail(9) β€” from the Kernel API Manual, bestie ✨

Okay so sit down, grab a strawberry πŸ“, because today we're talking about folio_fill_tail β€” yes that's the function name and yes it's giving main character energy in the highmem header world.


✨ NAME ✨

folio_fill_tail β€” copies some data to a folio and then pads it out with zeroes. Like, it fills the tail. The name literally ate. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void folio_fill_tail (struct folio *folio , size_t offset , const char
*from , size_t len );

That's the whole signature, no cap. No return value, it's a void β€” it just does the thing. πŸ¦‹


🌸 ARGUMENTS 🌸

  • folio β€” the destination folio πŸ’– like, where the data is going. The place. The venue. The location.
  • offset β€” the offset into folio at which to start copying 🎯 so like, how far in you start writing.
  • from β€” the data to copy 🌈 your source material, your payload, your vibes.
  • len β€” how many bytes of data to copy πŸ”₯ the exact amount, not a byte more of copyin'.

πŸ‘‘ DESCRIPTION πŸ‘‘

Okay so this function is most useful for filesystems which support inline data. When they want to copy data from the inode into the page cache, this function does everything for them β€” like a bestie who handles the group chat logistics so you don't have to 🫢 no cap.

And the slay part? It supports large folios even on HIGHMEM configurations. Iconic. It just works. ✨

Fr fr, the "does everything for them" is doing a lot of lifting here β€” the zero-padding of the tail is part of the deal. Don't forget it. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/highmem.h β€” and honestly the whole kmap friend group, listed here in full because we don't skip anybody:

Like, that's the entire squad right there. Iykyk. πŸ’œ


Mwah πŸ’‹ β€” this page lives in ./include/linux, dated October 2026, and that's the whole folio_fill_tail(9) lore. Go copy some data and pad those zeroes, bestie. Periodt. πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from