filemap_fda..._keep_errors(9)
π filemap_fdatawait_keep_errors π
okay so this is a page straight out of the Kernel API Manual (yes, section 9, the big-leagues one) and honestly? it's a little baddie with a very specific job. let's get into it π«Ά
β¨ NAME β¨
filemap_fdatawait_keep_errors β bestie, this one waits for writeback and does not clear your errors. that's the whole personality. π
πΈ SYNOPSIS πΈ
int filemap_fdatawait_keep_errors (struct address_space *mapping );
π ARGUMENTS π
mappingβ the address space structure you're waiting on. that's your girl right there, she's the one you're stalking (affectionately) until she's done. β¨
π¦ DESCRIPTION π¦
so what it actually does: it walks the list of under-writeback pages in the given address space and waits for all of them. all of them. every last one. no skipping, no shortcuts. π
but here's the plot twist, and it's giving main character energy: unlike filemap_fdatawait, this function does not clear the error status of the address space. it keeps those errors. it's literally in the name, iykyk. π
use this one if your callers don't handle errors themselves. like, they're not gonna deal with it, so you shouldn't be wiping the evidence. π
expected call sites are the system-wide / filesystem-wide data flushers, for example sync(2) and fsfreeze(8). yes, those ones. the big flushy ones. π₯
π RETURN π
it returns the error status of the address space. that's it, that's the tea. β
π SEE ALSO π
first up, the kernel file itself: ./mm/filemap.c β that's where the magic lives. π§
and now the full friend group, everybody say hi:
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_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 gc right there. go read them too. π
and that's the page!! brought to you by the ./mm crew, dated October 2026, and yeah the title's a little truncated in the header because apparently we ran out of room π β filemap_fda..._keep_errors(9) forever, an icon, a legend, a shortened queen. πβ¨π
π¦ 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