1 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
6 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
8 .TH BDFLUSH 2 2021-03-22 "Linux" "Linux Programmer's Manual"
10 bdflush \- start, flush, or tune buffer-dirty-flush daemon
13 .B #include <sys/kdaemon.h>
15 .BI "int bdflush(int " func ", long *" address );
16 .BI "int bdflush(int " func ", long " data );
20 There is no glibc wrapper for this system call; see VERSIONS.
24 .\" As noted in changes in the 2.5.12 source
25 this system call is deprecated and does nothing.
26 It is likely to disappear altogether in a future kernel release.
27 Nowadays, the task performed by
29 is handled by the kernel
34 starts, flushes, or tunes the buffer-dirty-flush daemon.
35 Only a privileged process (one with the
42 is negative or 0, and no daemon has been started, then
44 enters the daemon code and never returns.
49 some dirty buffers are written to disk.
53 is 2 or more and is even (low bit is 0), then
55 is the address of a long word,
56 and the tuning parameter numbered
57 .RI "(" "func" "\-2)/2"
58 is returned to the caller in that address.
62 is 3 or more and is odd (low bit is 1), then
65 and the kernel sets tuning parameter numbered
66 .RI "(" "func" "\-3)/2"
69 The set of parameters, their values, and their valid ranges
70 are defined in the Linux kernel source file
75 is negative or 0 and the daemon successfully starts,
78 Otherwise, the return value is 0 on success and \-1 on failure, with
80 set to indicate the error.
84 An attempt was made to enter the daemon code after
85 another process has already entered.
89 points outside your accessible address space.
92 An attempt was made to read or write an invalid parameter number,
93 or to write an invalid value to a parameter.
96 Caller does not have the
100 Since version 2.23, glibc no longer supports this obsolete system call.
103 is Linux-specific and should not be used in programs
104 intended to be portable.