1 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
24 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
25 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
27 .TH BDFLUSH 2 2021-03-22 "Linux" "Linux Programmer's Manual"
29 bdflush \- start, flush, or tune buffer-dirty-flush daemon
32 .B #include <sys/kdaemon.h>
34 .BI "int bdflush(int " func ", long *" address );
35 .BI "int bdflush(int " func ", long " data );
39 There is no glibc wrapper for this system call; see VERSIONS.
43 .\" As noted in a changes in the 2.5.12 source
44 this system call is deprecated and does nothing.
45 It is likely to disappear altogether in a future kernel release.
46 Nowadays, the task performed by
48 is handled by the kernel
53 starts, flushes, or tunes the buffer-dirty-flush daemon.
54 Only a privileged process (one with the
61 is negative or 0, and no daemon has been started, then
63 enters the daemon code and never returns.
68 some dirty buffers are written to disk.
72 is 2 or more and is even (low bit is 0), then
74 is the address of a long word,
75 and the tuning parameter numbered
76 .RI "(" "func" "\-2)/2"
77 is returned to the caller in that address.
81 is 3 or more and is odd (low bit is 1), then
84 and the kernel sets tuning parameter numbered
85 .RI "(" "func" "\-3)/2"
88 The set of parameters, their values, and their valid ranges
89 are defined in the Linux kernel source file
94 is negative or 0 and the daemon successfully starts,
97 Otherwise, the return value is 0 on success and \-1 on failure, with
99 set to indicate the error.
103 An attempt was made to enter the daemon code after
104 another process has already entered.
108 points outside your accessible address space.
111 An attempt was made to read or write an invalid parameter number,
112 or to write an invalid value to a parameter.
115 Caller does not have the
119 Since version 2.23, glibc no longer supports this obsolete system call.
122 is Linux-specific and should not be used in programs
123 intended to be portable.