1BDFLUSH(2)                 Linux Programmer's Manual                BDFLUSH(2)
2
3
4

NAME

6       bdflush - start, flush, or tune buffer-dirty-flush daemon
7

SYNOPSIS

9       #include <sys/kdaemon.h>
10
11       int bdflush(int func, long *address);
12       int bdflush(int func, long data);
13
14       Note: There is no glibc wrapper for this system call; see VERSIONS.
15

DESCRIPTION

17       Note: Since Linux 2.6, this system call is deprecated and does nothing.
18       It is likely to disappear altogether in a future kernel release.  Nowa‐
19       days,  the task performed by bdflush() is handled by the kernel pdflush
20       thread.
21
22       bdflush() starts, flushes,  or  tunes  the  buffer-dirty-flush  daemon.
23       Only  a  privileged process (one with the CAP_SYS_ADMIN capability) may
24       call bdflush().
25
26       If func is negative or 0, and no daemon  has  been  started,  then  bd‐
27       flush() enters the daemon code and never returns.
28
29       If func is 1, some dirty buffers are written to disk.
30
31       If  func  is  2 or more and is even (low bit is 0), then address is the
32       address of a long word, and the tuning parameter numbered (func-2)/2 is
33       returned to the caller in that address.
34
35       If  func  is  3  or more and is odd (low bit is 1), then data is a long
36       word, and the kernel sets tuning parameter numbered (func-3)/2 to  that
37       value.
38
39       The set of parameters, their values, and their valid ranges are defined
40       in the Linux kernel source file fs/buffer.c.
41

RETURN VALUE

43       If func is negative or 0 and the daemon successfully starts,  bdflush()
44       never  returns.   Otherwise, the return value is 0 on success and -1 on
45       failure, with errno set to indicate the error.
46

ERRORS

48       EBUSY  An attempt was made to  enter  the  daemon  code  after  another
49              process has already entered.
50
51       EFAULT address points outside your accessible address space.
52
53       EINVAL An  attempt  was made to read or write an invalid parameter num‐
54              ber, or to write an invalid value to a parameter.
55
56       EPERM  Caller does not have the CAP_SYS_ADMIN capability.
57

VERSIONS

59       Since version 2.23, glibc no longer supports this obsolete system call.
60

CONFORMING TO

62       bdflush() is Linux-specific and should not be used in programs intended
63       to be portable.
64

SEE ALSO

66       sync(1), fsync(2), sync(2)
67

COLOPHON

69       This  page  is  part of release 5.13 of the Linux man-pages project.  A
70       description of the project, information about reporting bugs,  and  the
71       latest     version     of     this    page,    can    be    found    at
72       https://www.kernel.org/doc/man-pages/.
73
74
75
76Linux                             2021-03-22                        BDFLUSH(2)
Impressum