buffer_migrate_folio_norefs(9)
β¨ buffer_migrate_folio_norefs β¨
okay so bestie, we're in the kernel API manual (section 9, the fancy kernel-doc one) and today's main character is buffer_migrate_folio_norefs β literally the migration function for folios with buffers π
π NAME π
buffer_migrate_folio_norefs β the migration function for folios that have buffers attached π
π¦ SYNOPSIS π¦
int buffer_migrate_folio_norefs (struct address_space *mapping , struct
folio *dst , struct folio *src , enum migrate_mode mode );
πΈ ARGUMENTS πΈ
mappingβ the address space that containssrcβ¨dstβ the folio we're migrating to π«Άsrcβ the folio we're migrating from π«modeβ how we're migrating the folio, iykyk π
π DESCRIPTION π
So it's basically buffer_migrate_folio, except this variant is the careful one β it's more cautious and actually checks that there are also no buffer head references. No cap, that's the whole extra vibe check π₯
This is the right function to reach for on mappings where buffer heads are directly looked up and referenced β block device mappings being the iconic example π
β RETURN β
0 on success, or a negative errno on 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(9)
and that's the whole page, bestie π«Ά this one lives over in ./mm and it's dated October 2026 β go forth and migrate those folios safely ππ
π¦ 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