OSDN Git Service

099aadc5d616500aa9b6cf33dfb29213b006a819
[linuxjm/LDP_man-pages.git] / draft / man2 / bdflush.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
26 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
27 .\"
28 .\"
29 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
30 .\"         all rights reserved.
31 .\" Translated Sat Feb 22 20:03:58 JST 1997
32 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Updated & Modified Thu Feb  3 03:15:15 JST 2005
34 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
35 .\"
36 .\"WORD:        buffer-dirty-flush      バッファー・ダーティー・フラッシュ
37 .\"WORD:        daemon                  デーモン
38 .\"WORD:        flush                   フラッシュ
39 .\"WORD:        tune                    調整
40 .\"WORD:        long word               ロング・ワード
41 .\"WORD:        parameter               パラメーター
42 .\"WORD:        source file             ソース・ファイル
43 .\"
44 .TH BDFLUSH 2 2004-06-17 "Linux" "Linux Programmer's Manual"
45 .\"O .SH NAME
46 .SH 名前
47 .\"O bdflush \- start, flush, or tune buffer-dirty-flush daemon
48 bdflush \- バッファー・ダーティー・フラッシュ・デーモンを起動、フラッシュ、調整する
49 .\"O .SH SYNOPSIS
50 .SH 書式
51 .nf
52 .B #include <sys/kdaemon.h>
53
54 .BI "int bdflush(int "  func ", long *" address );
55 .BI "int bdflush(int "  func ", long " data );
56 .fi
57 .\"O .SH DESCRIPTION
58 .SH 説明
59 .\"O .BR bdflush ()
60 .\"O starts, flushes, or tunes the buffer-dirty-flush daemon.
61 .BR bdflush ()
62 はバッファー・ダーティー・フラッシュ (buffer-dirty-flush)・
63 デーモン (daemon) を起動、フラッシュ (flush)、調整 (tune) する。
64 .\"O Only a privileged process (one with the
65 .\"O .B CAP_SYS_ADMIN
66 .\"O capability) may call
67 .\"O .BR bdflush ().
68 .RB ( CAP_SYS_ADMIN
69 ケーパビリティ (capability) を持つ) 特権プロセスのみが
70 .BR bdflush ()
71 を呼び出すことができる。
72 .PP
73 .\"O If
74 .\"O .I func
75 .\"O is negative or 0, and no daemon has been started, then
76 .\"O .BR bdflush ()
77 .\"O enters the daemon code and never returns.
78 .I func
79 が負か 0 でデーモンが起動されていなれば、
80 .BR bdflush ()
81 はデーモンのコードへ入り、戻ってこない。
82 .PP
83 .\"O If
84 .\"O .I func
85 .\"O is 1,
86 .\"O some dirty buffers are written to disk.
87 .I func
88 が 1 ならば、
89 汚れた (dirty) バッファーがディスクへと書き込まれる。
90 .PP
91 .\"O If
92 .\"O .I func
93 .\"O is 2 or more and is even (low bit is 0), then
94 .\"O .I address
95 .\"O is the address of a long word,
96 .\"O and the tuning parameter numbered
97 .\"O .RI "(" "func" "\-2)/2"
98 .\"O is returned to the caller in that address.
99 .I func
100 が 2 以上で偶数 (最小ビットが 0) ならば、
101 .I address
102 にロング・ワードでアドレスを指定し、そのアドレスに
103 .RI "(" "func" "\-2)/2" 
104 で指定された調節パラメーターが返される。
105 .PP
106 .\"O If
107 .\"O .I func
108 .\"O is 3 or more and is odd (low bit is 1), then
109 .\"O .I data
110 .\"O is a long word,
111 .\"O and the kernel sets tuning parameter numbered
112 .\"O .RI "(" "func" "\-3)/2"
113 .\"O to that value.
114 .I func
115 が 3 以上で奇数 (最小ビットが 1) ならば、
116 .I data
117 をロング・ワードで指定し、その値を
118 .RI "(" "func" "\-3)/2"
119 で指定された調節パラメーターに設定する。
120 .PP
121 .\"O The set of parameters, their values, and their valid ranges
122 .\"O are defined in the kernel source file
123 .\"O .IR fs/buffer.c .
124 パラメーターの集合やその値、有効な範囲はカーネルのソース・ファイルの
125 .I fs/buffer.c 
126 に定義されている。
127 .\"O .SH "RETURN VALUE"
128 .SH 返り値
129 .\"O If
130 .\"O .I func
131 .\"O is negative or 0 and the daemon successfully starts,
132 .\"O .BR bdflush ()
133 .\"O never returns.
134 .I func
135 が負か 0 で、デモーンの起動に成功した場合は
136 .BR bdflush ()
137 は返ってこない。
138 .\"O Otherwise, the return value is 0 on success and \-1 on failure, with
139 .\"O .I errno
140 .\"O set to indicate the error.
141 そうでなければ成功した場合には 0 が返される。失敗した場合には \-1 が返され、
142 .I errno
143 にそのエラーが指示される。
144 .\"O .SH ERRORS
145 .SH エラー
146 .TP
147 .B EBUSY
148 .\"O An attempt was made to enter the daemon code after
149 .\"O another process has already entered.
150 他のプロセスが既にデーモン・コードに入っているのに、入ろうと試みた。
151 .TP
152 .B EFAULT
153 .\"O .I address
154 .\"O points outside your accessible address space.
155 .I address
156 がアクセス可能なアドレス空間の外部を指している。
157 .TP
158 .B EINVAL
159 .\"O An attempt was made to read or write an invalid parameter number,
160 .\"O or to write an invalid value to a parameter.
161 不正なパラメーターの読み書きを試みたか、パラメーターへ不正な値を
162 書き込もうとした。
163 .TP
164 .B EPERM
165 .\"O Caller does not have the
166 .\"O .B CAP_SYS_ADMIN
167 .\"O capability.
168 呼び出し元に
169 .B CAP_SYS_ADMIN
170 ケーパビリティがない。
171 .\"O .SH "CONFORMING TO"
172 .SH 準拠
173 .\"O .BR bdflush ()
174 .\"O is Linux-specific and should not be used in programs
175 .\"O intended to be portable.
176 .BR bdflush ()
177 は Linux 特有であり移植を意図したプログラムで使用すべきではない。
178 .\"O .SH "SEE ALSO"
179 .SH 関連項目
180 .BR fsync (2),
181 .BR sync (2),
182 .BR sync (8),
183 .BR update (8)