buffer_migrate_folio(9)
π 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 containssrc. 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 π
0on success π- a negative
errnoon failure π
π SEE ALSO π
- Kernel file
./mm/migrate.c:isolate_movable_ops_page(9) putback_movable_ops_page(9)migrate_movable_ops_page(9)migrate_folio(9)buffer_migrate_folio_norefs(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms