folio_copy(9)
π folio_copy(9) β like, the whole scoop
okay so picture this: you're deep in the Kernel API Manual (yes, that one), and you land on folio_copy(9). She's small, she's mighty, and she's about to become your new fave. Let's get into it bestie π
β¨ NAME β¨
folio_copy β Copy the contents of one folio to another. That's it, that's the whole vibe. No cap. π
πΈ SYNOPSIS πΈ
void folio_copy (struct folio *dst , struct folio *src );
Look at her. Clean. Iconic. Returns nothing because she's not here to chat, she's here to work. π
π¦ ARGUMENTS π¦
dstβ the folio you're copying to. The destination. The main character receiving all the attention. π«Άsrcβ the folio you're copying from. The source. The origin story. Where the bytes are coming from. π
π DESCRIPTION π
So the bytes living inside the folio that src represents get copied over into dst. Simple as that, fr fr. π
β οΈ Heads up bestie: this function assumes the caller has already validated thatdstis at least as large assrc. It does not check. It trusts you. Do not betray that trust. π
And here's the multitasking part π
- You can call it in atomic context β but only for order-0 folios.
- If the folio is larger than that, it may sleep. π
So like... know which one you've got before you go calling her from somewhere she can't nap. Periodt.
π₯ SEE ALSO π₯
Everything below lives in the kernel file ./mm/util.c β and yes, she has friends. A whole friend group. A whole squad. Look at this roster π
kfree_const(9), __kmemdup_nul(9), kstrdup(9),
kstrdup_const(9), kstrndup(9), kmemdup(9), kmemdup_array(9),
kvmemdup(9), kmemdup_nul(9), memdup_user(9), vmemdup_user(9),
strndup_user(9), memdup_user_nul(9), randomize_page(9),
__account_locked_vm(9), account_locked_vm(9), __vmalloc_array(9),
vmalloc_array(9), __vcalloc(9), vcalloc(9), folio_mapping(9),
get_cmdline(9), mem_dump_obj(9), compat_set_desc_from_vma(9),
__compat_vma_mmap(9), compat_vma_mmap(9), snapshot_page(9),
mmap_action_prepare(9), mmap_action_complete(9), folio_pte_batch(9),
page_range_contiguous(9)
Not me listing all of them because every single one deserves a shoutout π iykyk
and that's the whole page, babes β go forth and copy your folios responsibly π§
mwah π this one's brought to you by the ./mm sources, dated October 2026, and filed under folio_copy(9). See you in the next manpage, bestie! πΈβ¨
π¦ 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