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 2012-03-05 "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 );
41 .\" As noted in a changes in the 2.5.12 source
42 this system call is deprecated and does nothing.
43 It is likely to disappear altogether in a future kernel release.
44 Nowadays, the task performed by
46 is handled by the kernel
51 starts, flushes, or tunes the buffer-dirty-flush daemon.
52 Only a privileged process (one with the
59 is negative or 0, and no daemon has been started, then
61 enters the daemon code and never returns.
66 some dirty buffers are written to disk.
70 is 2 or more and is even (low bit is 0), then
72 is the address of a long word,
73 and the tuning parameter numbered
74 .RI "(" "func" "\-2)/2"
75 is returned to the caller in that address.
79 is 3 or more and is odd (low bit is 1), then
82 and the kernel sets tuning parameter numbered
83 .RI "(" "func" "\-3)/2"
86 The set of parameters, their values, and their valid ranges
87 are defined in the kernel source file
92 is negative or 0 and the daemon successfully starts,
95 Otherwise, the return value is 0 on success and \-1 on failure, with
97 set to indicate the error.
101 An attempt was made to enter the daemon code after
102 another process has already entered.
106 points outside your accessible address space.
109 An attempt was made to read or write an invalid parameter number,
110 or to write an invalid value to a parameter.
113 Caller does not have the
118 is Linux-specific and should not be used in programs
119 intended to be portable.