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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

VERSIONS

57       Since version 2.23, glibc no longer supports this obsolete system call.
58

CONFORMING TO

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

SEE ALSO

64       sync(1), fsync(2), sync(2)
65

COLOPHON

67       This  page  is  part of release 4.15 of the Linux man-pages project.  A
68       description of the project, information about reporting bugs,  and  the
69       latest     version     of     this    page,    can    be    found    at
70       https://www.kernel.org/doc/man-pages/.
71
72
73
74Linux                             2016-10-08                        BDFLUSH(2)
Impressum