1bdflush(2)                    System Calls 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       [[deprecated]] int bdflush(int func, long *address);
12       [[deprecated]] 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  bd‐
25       flush() 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

STANDARDS

57       Linux.
58

HISTORY

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

SEE ALSO

63       sync(1), fsync(2), sync(2)
64
65
66
67Linux man-pages 6.05              2023-03-30                        bdflush(2)
Impressum