filemap_flush(9)
π filemap_flush β like, the mostly non-blocking flush bestie
okay so this is filemap_flush(9) from the Kernel API Manual, section 9 (kernel API, the fun one). Buckle up π
β¨ NAME β¨
filemap_flush β mostly a non-blocking flush πΈ
like yes it flushes, no it does not fully commit, it's giving "I'll get to it" energy π«Ά
β¨ SYNOPSIS β¨
int filemap_flush (struct address_space *mapping );
β¨ ARGUMENTS β¨
mappingβ the targetaddress_space, aka the thing you're flushing. that's it, that's the whole argument π
β¨ DESCRIPTION β¨
So this is a mostly non-blocking flush. Note the mostly β that word is doing a LOT of heavy lifting here, bestie π
It is not suitable for data-integrity purposes, and I need you to say that back to me: the I/O may not be started against all dirty pages. So if you were about to use this to guarantee your data actually made it to diskβ¦ no. do not. that is not the vibe. π«
β οΈ real talk: if data integrity is your whole personality, this is not the function for you. it's the "fire and sort-of-forget" one. periodt.
β¨ RETURN β¨
0on success π- negative error code otherwise π
β¨ SEE ALSO β¨
and because the kernel is a group chat and nobody gets left on read, here's the whole squad π the kernel file ./mm/filemap.c plus:
filemap_remove_folio(9)filemap_fdatawrite_range(9)filemap_flush_range(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)
and that's the page, bestie π this cuteness was served up by the source directory ./mm (yep, the ./mm one) and it's dated October 2026 β so when you cite it, it's filemap_flush(9), ./mm, October 2026. 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