filemap_flush_range(9)
π filemap_flush_range(9) β Kernel API Manual, bestie edition
okay so picture this: it's a kernel API manual page, it's called filemap_flush_range, and it is literally the "hey babe, go write that stuff out" of mm/filemap.c. no cap. let's get into it π«Ά
β¨ NAME β¨
filemap_flush_range β start writeback on a range π
yes that's it that's the whole name section, she's petite but she SERVES
πΈ SYNOPSIS πΈ
int filemap_flush_range (struct address_space *mapping , loff_t start ,
loff_t end );
look at her. three args. returns an int. iconic behavior honestly π
π¦ ARGUMENTS π¦
mappingβ the targetaddress_space. this is the vibes container you're operating on, the main character of the whole operation πstartβ the index to start writeback on. your starting point, your "we begin here" moment β¨endβ the last (inclusive!!) index for writeback. yes bestie, inclusive, soendgets an invite to the party too π
π DESCRIPTION π
so what does she actually do? she's a non-integrity writeback helper β say that again, non-integrity, meaning she is NOT out here doing the whole integrity dance, okay? she's just the casual one π§
her one job: start writing back folios for the indicated range. that's the whole gig. she doesn't verify, she doesn't wait around, she doesn't text back β she just kicks off the writeback for the folios in that range you gave her π₯
lowkey a queen of delegation, ngl.
β RETURN β
0on success π- a negative error code otherwise π
so like, if it's 0, we're slaying. if it's negative, something went sideways and she's telling you about it via the return value. read it. respect it. π
π SEE ALSO π
the full squad, in order, no skipping, no cutting corners, we love a complete rotation:
- Kernel file
./mm/filemap.cβ the source file where all this magic lives π« filemap_remove_folio(9)filemap_fdatawrite_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_read(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)
like, that's the whole friend group right there. go read them. iykyk π
and that's the page, bestie!! π this one came from the ./mm source, dated October 2026, and it signs off as filemap_flush_range(9) β so if you cite her, cite her right. 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