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       bdflush()  starts,  flushes,  or  tunes  the buffer-dirty-flush daemon.
16       Only a privileged process (one with the CAP_SYS_ADMIN  capability)  may
17       call bdflush().
18
19       If  func  is  negative  or  0,  and  no  daemon  has been started, then
20       bdflush() enters the daemon code and never returns.
21
22       If func is 1, some dirty buffers are written to disk.
23
24       If func is 2 or more and is even (low bit is 0), then  address  is  the
25       address of a long word, and the tuning parameter numbered (func-2)/2 is
26       returned to the caller in that address.
27
28       If func is 3 or more and is odd (low bit is 1), then  data  is  a  long
29       word,  and the kernel sets tuning parameter numbered (func-3)/2 to that
30       value.
31
32       The set of parameters, their values, and their valid ranges are defined
33       in the kernel source file fs/buffer.c.
34

RETURN VALUE

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

ERRORS

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

CONFORMING TO

52       bdflush() is Linux-specific and should not be used in programs intended
53       to be portable.
54

SEE ALSO

56       fsync(2), sync(2), sync(8), update(8)
57

COLOPHON

59       This page is part of release 3.25 of the Linux  man-pages  project.   A
60       description  of  the project, and information about reporting bugs, can
61       be found at http://www.kernel.org/doc/man-pages/.
62
63
64
65Linux                             2004-06-17                        BDFLUSH(2)
Impressum