buffer_migrate_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… buffer_migrate_folio(9) πŸ¦‹

okay so bestie, welcome to the Kernel API Manual entry for buffer_migrate_folio(9) β€” yes the (9) means kernel-internal, we're in the deep end and it's giving main character energy ✨

✨ NAME ✨

buffer_migrate_folio β€” the migration function for folios with buffers. periodt πŸ’–

🌸 SYNOPSIS 🌸

int buffer_migrate_folio (struct address_space *mapping , struct folio
*dst , struct folio *src , enum migrate_mode mode );

πŸŽ€ ARGUMENTS πŸŽ€

  • mapping β€” the address space that contains src. that's the home base 🏠
  • dst β€” the folio we're migrating to (the destination slay) πŸ’«
  • src β€” the folio we're migrating from (the one leaving the group chat) 😭
  • mode β€” how to migrate the folio. the vibe check for the whole operation πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea πŸ“ β€” this function can only be used if the underlying filesystem guarantees that no other references to src exist. like, fr fr, that's not optional.

for example: attached buffer heads are accessed only under the folio lock. that's the guarantee in action, iykyk πŸ”’

⚠️ if your filesystem cannot provide this guarantee, buffer_migrate_folio_norefs may be more appropriate. please don't skip this, bestie, this is one of those "read the docs or cry later" situations πŸ˜­πŸ’€

🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • a negative errno on failure πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's a wrap, babe 🫢 this iconic lil page came from the source ./mm, dated October 2026, and it lives in the Kernel API Manual. go migrate some folios responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from