194 lines
4.0 KiB
HTML
194 lines
4.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of BDFLUSH</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>BDFLUSH</H1>
|
|
Section: Linux Programmer's Manual (2)<BR>Updated: 2016-10-08<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
bdflush - start, flush, or tune buffer-dirty-flush daemon
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<PRE>
|
|
<B>#include <<A HREF="file:///usr/include/sys/kdaemon.h">sys/kdaemon.h</A>></B>
|
|
|
|
<B>int bdflush(int </B><I>func</I><B>, long *</B><I>address</I><B>);</B>
|
|
<B>int bdflush(int </B><I>func</I><B>, long </B><I>data</I><B>);</B>
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<I>Note</I>:
|
|
|
|
Since Linux 2.6,
|
|
|
|
this system call is deprecated and does nothing.
|
|
It is likely to disappear altogether in a future kernel release.
|
|
Nowadays, the task performed by
|
|
<B>bdflush</B>()
|
|
|
|
is handled by the kernel
|
|
<I>pdflush</I>
|
|
|
|
thread.
|
|
<P>
|
|
|
|
<B>bdflush</B>()
|
|
|
|
starts, flushes, or tunes the buffer-dirty-flush daemon.
|
|
Only a privileged process (one with the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability) may call
|
|
<B>bdflush</B>().
|
|
|
|
<P>
|
|
|
|
If
|
|
<I>func</I>
|
|
|
|
is negative or 0, and no daemon has been started, then
|
|
<B>bdflush</B>()
|
|
|
|
enters the daemon code and never returns.
|
|
<P>
|
|
|
|
If
|
|
<I>func</I>
|
|
|
|
is 1,
|
|
some dirty buffers are written to disk.
|
|
<P>
|
|
|
|
If
|
|
<I>func</I>
|
|
|
|
is 2 or more and is even (low bit is 0), then
|
|
<I>address</I>
|
|
|
|
is the address of a long word,
|
|
and the tuning parameter numbered
|
|
(<I>func</I>-2)/2
|
|
|
|
is returned to the caller in that address.
|
|
<P>
|
|
|
|
If
|
|
<I>func</I>
|
|
|
|
is 3 or more and is odd (low bit is 1), then
|
|
<I>data</I>
|
|
|
|
is a long word,
|
|
and the kernel sets tuning parameter numbered
|
|
(<I>func</I>-3)/2
|
|
|
|
to that value.
|
|
<P>
|
|
|
|
The set of parameters, their values, and their valid ranges
|
|
are defined in the Linux kernel source file
|
|
<I>fs/buffer.c</I>.
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
If
|
|
<I>func</I>
|
|
|
|
is negative or 0 and the daemon successfully starts,
|
|
<B>bdflush</B>()
|
|
|
|
never returns.
|
|
Otherwise, the return value is 0 on success and -1 on failure, with
|
|
<I>errno</I>
|
|
|
|
set to indicate the error.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ERRORS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>EBUSY</B>
|
|
|
|
<DD>
|
|
An attempt was made to enter the daemon code after
|
|
another process has already entered.
|
|
<DT id="2"><B>EFAULT</B>
|
|
|
|
<DD>
|
|
<I>address</I>
|
|
|
|
points outside your accessible address space.
|
|
<DT id="3"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
An attempt was made to read or write an invalid parameter number,
|
|
or to write an invalid value to a parameter.
|
|
<DT id="4"><B>EPERM</B>
|
|
|
|
<DD>
|
|
Caller does not have the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
Since version 2.23, glibc no longer supports this obsolete system call.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
<B>bdflush</B>()
|
|
|
|
is Linux-specific and should not be used in programs
|
|
intended to be portable.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+sync">sync</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fsync">fsync</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sync">sync</A></B>(2)
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="8"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">ERRORS</A><DD>
|
|
<DT id="10"><A HREF="#lbAG">VERSIONS</A><DD>
|
|
<DT id="11"><A HREF="#lbAH">CONFORMING TO</A><DD>
|
|
<DT id="12"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="13"><A HREF="#lbAJ">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:32 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|