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       int bdflush(int func, long *address);
10       int bdflush(int func, long data);
11

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

CONFORMING TO

50       bdflush() is Linux specific and should not be used in programs intended
51       to be portable.
52

SEE ALSO

54       fsync(2), sync(2), sync(8), update(8)
55
56
57
58Linux 2.6.7                       2004-06-17                        BDFLUSH(2)
Impressum