folio_end_read(9)
π
folio_end_read β the folio_end_read(9) page, bestie edition
okay so welcome to the folio_end_read(9) glow-up β¨ this one lives in the Kernel API Manual and honestly? she's short, she's sweet, she's important. let's get into it π«Ά
πΈ NAME πΈ
folio_end_read β literally just: end read on a folio. that's the whole vibe. periodt.
β¨ SYNOPSIS β¨
void folio_end_read (struct folio *folio , bool success );
like yes that's the entire signature, no cap π
π ARGUMENTS π
folioβ The folio. that's her. that's the main character of this whole page πsuccessβtrueif all reads completed successfully. like, did everything actually work? yes or no, no in-between π
π DESCRIPTION π
so here's the tea β when all reads against a folio have completed, filesystems should call this function to let the pagecache know that no more reads are outstanding. it's literally the "we're done here, bestie" signal π«‘
this will unlock the folio and wake up any thread sleeping on the lock. yeah, she wakes the whole group chat up π
and the folio will also be marked uptodate if all reads succeeded. slay. that's the reward for a job well done β¨π
π¦ CONTEXT π¦
- may be called from interrupt or process context. both? both. flexible queen π
- may not be called from NMI context. nope. not there. do not do it π«π
fr fr, respect the NMI restriction. it's not a vibe check you want to fail.
π SEE ALSO π
Kernel file ./mm/filemap.c, and the whole squad:
filemap_remove_folio(9)filemap_fdatawrite_range(9)filemap_flush_range(9)filemap_flush(9)filemap_range_has_page(9)filemap_fdatawait_range(9)filemap_fdatawait_range_keep_errors(9)file_fdatawait_range(9)filemap_fdatawait_keep_errors(9)filemap_write_and_wait_range(9)file_check_and_advance_wb_err(9)file_write_and_wait_range(9)replace_page_cache_folio(9)softleaf_entry_wait_on_locked(9)folio_put_wait_locked(9)folio_unlock(9)folio_end_private_2(9)folio_wait_private_2(9)folio_wait_private_2_killable(9)folio_end_writeback_no_dropbehind(9)folio_end_writeback(9)__folio_lock(9)page_cache_next_miss(9)page_cache_prev_miss(9)__filemap_get_folio_mpol(9)find_get_entries(9)find_lock_entries(9)filemap_get_folios(9)filemap_get_folios_contig(9)filemap_get_folios_tag(9)filemap_get_folios_dirty(9)filemap_read(9)generic_file_read_iter(9)filemap_splice_read(9)mapping_seek_hole_data(9)filemap_fault(9)read_cache_folio(9)mapping_read_folio_gfp(9)read_cache_page_gfp(9)__generic_file_write_iter(9)generic_file_write_iter(9)filemap_release_folio(9)filemap_invalidate_inode(9)filemap_cachestat(9)
iykyk π that's the entire friend group, no one left out.
and that's the page!! π this little gem comes to you from the ./mm source, dated October 2026 β go forth and end those reads, 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