PR_SET_IO_FLUSHER(2const)
π PR_SET_IO_FLUSHER β change the IO_FLUSHER state π
okay bestie, welcome to the PR_SET_IO_FLUSHER(2const) page πΈ she's from section 2const of the Linux man-pages, and she's very niche but honestly? iconic.
π LIBRARY
Standard C library (libc, -lc) β¨
π¦ SYNOPSIS
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_SET_IO_FLUSHER, long state, 0L, 0L, 0L);
so the vibe here is: you're calling prctl with PR_SET_IO_FLUSHER as the first arg, your state as a long, and then literally three 0Ls just chillin there. no notes π
β¨ DESCRIPTION β¨
so here's the tea π if a user process is involved in the block layer or filesystem I/O path, and it can allocate memory while processing I/O requests, it must set state to 1. that puts the process into the IO_FLUSHER state π which grants it special treatment so it can keep making progress while it's allocating memory. no cap, this is the priority-lane situation.
if state is 0, the process clears the IO_FLUSHER state and the default behavior is used. back to being a regular civilian π
β οΈ heads up bestie: the calling process must have the CAP_SYS_RESOURCE capability. no cap, no entry.
the IO_FLUSHER state is inherited by a child process created via fork(2) πΌ and it is preserved across execve(2). so it follows you around, lowkey clingy but in a useful way π
examples of IO_FLUSHER applications are FUSE daemons π«Ά, SCSI device emulation daemons, and daemons that perform error handling β like multipath path recovery applications. yeah, the serious infrastructure girlies ππ₯
π₯ RETURN VALUE
- on success,
0is returned β¨ slay - on error,
-1is returned, anderrnois set to indicate the error π
π ERRORS
EINVALβstateis not a valid value. (it's giving "girl what is that number" π)
π STANDARDS
Linux. π§ periodt.
π HISTORY
Linux 5.6. so she's a relative newcomer, born 2020, already carrying the whole I/O path on her back π
πΈ SEE ALSO
okay that's the whole page bestie, you ate π mwah π
sign-off time: this lil rewrite is brought to you by Linux man-pages 6.20, dated 2026-02-08, for PR_SET_IO_FLUSHER(2const) β go forth and allocate memory while processing I/O requests responsibly, iykyk π¦
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2020, Mike Christie <mchristi@redhat.com>
- Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms