1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
26 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
28 .TH BDFLUSH 2 2004-06-17 "Linux" "Linux Programmer's Manual"
30 bdflush \- start, flush, or tune buffer-dirty-flush daemon
33 .B #include <sys/kdaemon.h>
35 .BI "int bdflush(int " func ", long *" address );
36 .BI "int bdflush(int " func ", long " data );
40 starts, flushes, or tunes the buffer-dirty-flush daemon.
41 Only a privileged process (one with the
48 is negative or 0, and no daemon has been started, then
50 enters the daemon code and never returns.
55 some dirty buffers are written to disk.
59 is 2 or more and is even (low bit is 0), then
61 is the address of a long word,
62 and the tuning parameter numbered
63 .RI "(" "func" "\-2)/2"
64 is returned to the caller in that address.
68 is 3 or more and is odd (low bit is 1), then
71 and the kernel sets tuning parameter numbered
72 .RI "(" "func" "\-3)/2"
75 The set of parameters, their values, and their valid ranges
76 are defined in the kernel source file
81 is negative or 0 and the daemon successfully starts,
84 Otherwise, the return value is 0 on success and \-1 on failure, with
86 set to indicate the error.
90 An attempt was made to enter the daemon code after
91 another process has already entered.
95 points outside your accessible address space.
98 An attempt was made to read or write an invalid parameter number,
99 or to write an invalid value to a parameter.
102 Caller does not have the
107 is Linux-specific and should not be used in programs
108 intended to be portable.