]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995. |
2 | .\" | |
e4a74ca8 | 3 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da MK |
4 | .\" |
5 | .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com> | |
c11b1abf | 6 | .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da | 7 | .\" |
4c1c5274 | 8 | .TH bdflush 2 (date) "Linux man-pages (unreleased)" |
fea681da MK |
9 | .SH NAME |
10 | bdflush \- start, flush, or tune buffer-dirty-flush daemon | |
11 | .SH SYNOPSIS | |
12 | .nf | |
332f4bb9 | 13 | .B #include <sys/kdaemon.h> |
8811e15a | 14 | .PP |
a6fd076a AC |
15 | .BI "[[deprecated]] int bdflush(int " func ", long *" address ); |
16 | .BI "[[deprecated]] int bdflush(int " func ", long " data ); | |
fea681da MK |
17 | .fi |
18 | .SH DESCRIPTION | |
966ba498 MK |
19 | .IR Note : |
20 | Since Linux 2.6, | |
4438c392 | 21 | .\" As noted in changes in the 2.5.12 source |
966ba498 MK |
22 | this system call is deprecated and does nothing. |
23 | It is likely to disappear altogether in a future kernel release. | |
d6e37473 | 24 | Nowadays, the task performed by |
966ba498 MK |
25 | .BR bdflush () |
26 | is handled by the kernel | |
27 | .I pdflush | |
28 | thread. | |
8811e15a | 29 | .PP |
e511ffb6 | 30 | .BR bdflush () |
fea681da MK |
31 | starts, flushes, or tunes the buffer-dirty-flush daemon. |
32 | Only a privileged process (one with the | |
33 | .B CAP_SYS_ADMIN | |
34 | capability) may call | |
e511ffb6 | 35 | .BR bdflush (). |
fea681da MK |
36 | .PP |
37 | If | |
38 | .I func | |
39 | is negative or 0, and no daemon has been started, then | |
e511ffb6 | 40 | .BR bdflush () |
fea681da MK |
41 | enters the daemon code and never returns. |
42 | .PP | |
43 | If | |
44 | .I func | |
45 | is 1, | |
46 | some dirty buffers are written to disk. | |
47 | .PP | |
48 | If | |
49 | .I func | |
50 | is 2 or more and is even (low bit is 0), then | |
51 | .I address | |
52 | is the address of a long word, | |
53 | and the tuning parameter numbered | |
54 | .RI "(" "func" "\-2)/2" | |
55 | is returned to the caller in that address. | |
56 | .PP | |
57 | If | |
58 | .I func | |
59 | is 3 or more and is odd (low bit is 1), then | |
60 | .I data | |
61 | is a long word, | |
62 | and the kernel sets tuning parameter numbered | |
63 | .RI "(" "func" "\-3)/2" | |
64 | to that value. | |
65 | .PP | |
e935e108 | 66 | The set of parameters, their values, and their valid ranges |
66a9882e | 67 | are defined in the Linux kernel source file |
fea681da | 68 | .IR fs/buffer.c . |
47297adb | 69 | .SH RETURN VALUE |
fea681da MK |
70 | If |
71 | .I func | |
72 | is negative or 0 and the daemon successfully starts, | |
e511ffb6 | 73 | .BR bdflush () |
fea681da MK |
74 | never returns. |
75 | Otherwise, the return value is 0 on success and \-1 on failure, with | |
76 | .I errno | |
77 | set to indicate the error. | |
78 | .SH ERRORS | |
79 | .TP | |
80 | .B EBUSY | |
81 | An attempt was made to enter the daemon code after | |
82 | another process has already entered. | |
83 | .TP | |
84 | .B EFAULT | |
85 | .I address | |
86 | points outside your accessible address space. | |
87 | .TP | |
88 | .B EINVAL | |
89 | An attempt was made to read or write an invalid parameter number, | |
90 | or to write an invalid value to a parameter. | |
91 | .TP | |
92 | .B EPERM | |
93 | Caller does not have the | |
94 | .B CAP_SYS_ADMIN | |
95 | capability. | |
74b807b4 | 96 | .SH VERSIONS |
7be3122f | 97 | Since version 2.23, glibc no longer supports this obsolete system call. |
3113c7f3 | 98 | .SH STANDARDS |
0bfa087b | 99 | .BR bdflush () |
8382f16d | 100 | is Linux-specific and should not be used in programs |
fea681da | 101 | intended to be portable. |
47297adb | 102 | .SH SEE ALSO |
a87041ac | 103 | .BR sync (1), |
fea681da | 104 | .BR fsync (2), |
a87041ac | 105 | .BR sync (2) |