nilfs_copy_folio(9)
Hey bestie π welcome to the Kernel API Manual β this is the page for nilfs_copy_folio(9), and itβs lowkey iconic.
β¨ NAME β¨
nilfs_copy_folio β copy the folio with buffers
πΈ SYNOPSIS πΈ
void nilfs_copy_folio (struct folio *dst , struct folio *src , bool
copy_dirty );
π ARGUMENTS π
dstβ destination folio. The one getting the copy, periodt.srcβ source folio. The one being copied from.copy_dirtyβ flag whether to copy dirty states on the folioβs buffer heads. Literally controls whether those dirty states get copied.
π DESCRIPTION π
Okay so hereβs the vibe: this function is for both data folios and btnode folios. The dirty flag should be treated by caller β yes, caller, thatβs you, bestie. The folio must not be under i/o. Both src and dst folio must be locked.
β οΈ Big warning: the folio must not be under i/o. Like, do not do it. π Also, bothsrcanddstfolio must be locked. Both. Locked. No cap.
π SEE ALSO π
The Kernel file is ./fs/nilfs2/page.c, and these related entries are 100% worth a peek:
nilfs_forget_buffer(9)nilfs_copy_buffer(9)nilfs_folio_buffers_clean(9)nilfs_copy_back_pages(9)nilfs_clear_dirty_pages(9)nilfs_clear_folio_dirty(9)nilfs_find_uncommitted_extent(9)
byeee π«Ά this page comes from the ./fs/nilfs2 source/version, dated October 2026, and itβs literally nilfs_copy_folio(9). Slay. π
π¦ 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