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 2016-03-15 "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 );
40 .\" As noted in a changes in the 2.5.12 source
41 this system call is deprecated and does nothing.
42 It is likely to disappear altogether in a future kernel release.
43 Nowadays, the task performed by
45 is handled by the kernel
50 starts, flushes, or tunes the buffer-dirty-flush daemon.
51 Only a privileged process (one with the
58 is negative or 0, and no daemon has been started, then
60 enters the daemon code and never returns.
65 some dirty buffers are written to disk.
69 is 2 or more and is even (low bit is 0), then
71 is the address of a long word,
72 and the tuning parameter numbered
73 .RI "(" "func" "\-2)/2"
74 is returned to the caller in that address.
78 is 3 or more and is odd (low bit is 1), then
81 and the kernel sets tuning parameter numbered
82 .RI "(" "func" "\-3)/2"
85 The set of parameters, their values, and their valid ranges
86 are defined in the Linux kernel source file
91 is negative or 0 and the daemon successfully starts,
94 Otherwise, the return value is 0 on success and \-1 on failure, with
96 set to indicate the error.
100 An attempt was made to enter the daemon code after
101 another process has already entered.
105 points outside your accessible address space.
108 An attempt was made to read or write an invalid parameter number,
109 or to write an invalid value to a parameter.
112 Caller does not have the
116 Since version 2.23, glibc no longer supports this obsolete system call.
119 is Linux-specific and should not be used in programs
120 intended to be portable.