filemap_fda..._keep_errors(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:

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