Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_IO_FLUSHER.2const

raw
1 .\" Copyright 2020, Mike Christie <[email protected]>
2 .\" Copyright 2020, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_IO_FLUSHER 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_SET_IO_FLUSHER
10 \-
11 change the IO_FLUSHER state
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_SET_IO_FLUSHER, long " state ", 0L, 0L, 0L);"
21 .fi
22 .SH DESCRIPTION
23 If a user process is involved in the block layer or filesystem I/O path,
24 and can allocate memory while processing I/O requests it must set
25 .I state
26 to 1.
27 This will put the process in the IO_FLUSHER state,
28 which allows it special treatment to make progress when allocating memory.
29 If
30 .I state
31 is 0,
32 the process will clear the IO_FLUSHER state,
33 and the default behavior will be used.
34 .P
35 The calling process must have the
36 .B CAP_SYS_RESOURCE
37 capability.
38 .P
39 The IO_FLUSHER state is inherited by a child process created via
40 .BR fork (2)
41 and is preserved across
42 .BR execve (2).
43 .P
44 Examples of IO_FLUSHER applications are
45 FUSE daemons,
46 SCSI device emulation daemons,
47 and daemons that perform error handling
48 like multipath path recovery applications.
49 .SH RETURN VALUE
50 On success,
51 0 is returned.
52 On error, \-1 is returned, and
53 .I errno
54 is set to indicate the error.
55 .SH ERRORS
56 .TP
57 .B EINVAL
58 .I state
59 is not a valid value.
60 .SH STANDARDS
61 Linux.
62 .SH HISTORY
63 Linux 5.6.
64 .SH SEE ALSO
65 .BR prctl (2),
66 .BR PR_GET_IO_FLUSHER (2const)