+#. type: SS
+#: build/C/man2/open.2:1112
+#, no-wrap
+msgid "Synchronized I/O"
+msgstr "同期 I/O"
+
+#. type: Plain text
+#: build/C/man2/open.2:1127
+msgid ""
+"The POSIX.1-2008 \"synchronized I/O\" option specifies different variants of "
+"synchronized I/O, and specifies the B<open>() flags B<O_SYNC>, B<O_DSYNC>, "
+"and B<O_RSYNC> for controlling the behavior. Regardless of whether an "
+"implementation supports this option, it must at least support the use of "
+"B<O_SYNC> for regular files."
+msgstr ""
+"POSIX.1-2008 の「同期 I/O」の選択肢として複数種類が規定されており、 動作を制"
+"御するために B<open>() フラグとして B<O_SYNC>, B<O_DSYNC>, B<O_RSYNC> が規定"
+"されている。 この選択肢を実装がサポートしているかに関わらず、 各実装では少な"
+"くとも通常のファイルに対して B<O_SYNC> が利用できなければならない。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1138
+msgid ""
+"Linux implements B<O_SYNC> and B<O_DSYNC>, but not B<O_RSYNC>. (Somewhat "
+"incorrectly, glibc defines B<O_RSYNC> to have the same value as B<O_SYNC>.)"
+msgstr ""
+"Linux は B<O_SYNC> と B<O_DSYNC> を実装しているが、 B<O_RSYNC> は実装していな"
+"い (少し間違っているのだが、 glibc では B<O_RSYNC> が B<O_SYNC> と同じ値で定"
+"義されている)。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1156
+msgid ""
+"B<O_SYNC> provides synchronized I/O I<file> integrity completion, meaning "
+"write operations will flush data and all associated metadata to the "
+"underlying hardware. B<O_DSYNC> provides synchronized I/O I<data> integrity "
+"completion, meaning write operations will flush data to the underlying "
+"hardware, but will only flush metadata updates that are required to allow a "
+"subsequent read operation to complete successfully. Data integrity "
+"completion can reduce the number of disk operations that are required for "
+"applications that don't need the guarantees of file integrity completion."
+msgstr ""
+"B<O_SYNC> は、 同期 I/O でのI<ファイル>完全性完了を提供する。 つまり、 書き込"
+"み操作はデータとすべての関連メタデータを裏で利用されているハードウェアにフ"
+"ラッシュすることを意味する。 B<O_DSYNC> は、 同期 I/O でのI<データ>完全性完了"
+"を提供する。 つまり、 書き込み操作はデータを裏で利用されているハードウェアに"
+"フラッシュするが、 それ以降の読み出し操作が正常に完了するのに必要なメタデータ"
+"の更新のみをフラッシュする。 データ完全性完了は、 ファイル完全性完了を必要と"
+"しないアプリケーションで、 ディスク操作の数を減らすことができる。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1173
+msgid ""
+"To understand the difference between the the two types of completion, "
+"consider two pieces of file metadata: the file last modification timestamp "
+"(I<st_mtime>) and the file length. All write operations will update the "
+"last file modification timestamp, but only writes that add data to the end "
+"of the file will change the file length. The last modification timestamp is "
+"not needed to ensure that a read completes successfully, but the file length "
+"is. Thus, B<O_DSYNC> would only guarantee to flush updates to the file "
+"length metadata (whereas B<O_SYNC> would also always flush the last "
+"modification timestamp metadata)."
+msgstr ""
+"2 種類の完了の違いを理解するために、 ファイルメタデータの 2 つの要素、 ファイ"
+"ルの最終修正時刻 (I<st_mtime>) とファイル長、を考える。 すべての書き込み操作"
+"は最終修正時刻を更新するが、 ファイルの末尾にデータを追加する書き込み操作のみ"
+"がファイル長を変更する。 最終修正時刻は、 読み出しが正常に完了するのに必要で"
+"はないが、 ファイル長は必要である。 したがって、 B<O_DSYNC> はファイル長のメ"
+"タデータの更新がフラッシュされることだけを保証する (これに対して B<O_SYNC> で"
+"は最終修正時刻のメタデータも常にフラッシュされる)。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1185
+msgid ""
+"Before Linux 2.6.33, Linux implemented only the B<O_SYNC> flag for "
+"B<open>(). However, when that flag was specified, most filesystems actually "
+"provided the equivalent of synchronized I/O I<data> integrity completion (i."
+"e., B<O_SYNC> was actually implemented as the equivalent of B<O_DSYNC>)."
+msgstr ""
+"Linux 2.6.33 より前では、 Linux は B<open>() では B<O_SYNC> フラグのみを実装"
+"していた。 しかしながら、 このフラグが指定された場合、 ほとんどのファイルシス"
+"テムで提供されていたのは実際には同期 I/O でのI<データ>完全性完了と等価なもの"
+"であった (つまり、 B<O_SYNC> は実際には B<O_DSYNC> と等価なものとして実装され"
+"ていた)。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1204
+msgid ""
+"Since Linux 2.6.33, proper B<O_SYNC> support is provided. However, to "
+"ensure backward binary compatibility, B<O_DSYNC> was defined with the same "
+"value as the historical B<O_SYNC>, and B<O_SYNC> was defined as a new (two-"
+"bit) flag value that includes the B<O_DSYNC> flag value. This ensures that "
+"applications compiled against new headers get at least B<O_DSYNC> semantics "
+"on pre-2.6.33 kernels."
+msgstr ""
+"Linux 2.6.33 行こう では、 正しい B<O_SYNC> のサポートが提供されている。 しか"
+"しながら、 バイナリレベルの後方互換性を保証するため、 B<O_DSYNC> は以前の "
+"B<O_SYNC> と同じ値で定義されており、 B<O_SYNC> は B<O_DSYNC> フラグの値を含む"
+"新しい (2 ビットの) フラグ値として定義されている。 これにより、 新しいヘッダ"
+"を使ってコンパイルされたアプリケーションで、 2.6.33 より前のカーネルで少なく"
+"とも B<O_DSYNC> の動作は同じになることが保証される。"
+
+#. type: SS
+#: build/C/man2/open.2:1204
+#, no-wrap
+msgid "NFS"
+msgstr "NFS"
+
+#. type: Plain text
+#: build/C/man2/open.2:1208
+msgid ""
+"There are many infelicities in the protocol underlying NFS, affecting "
+"amongst others B<O_SYNC> and B<O_NDELAY>."
+msgstr ""
+"NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
+"B<O_NDELAY> に影響する。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1223
+msgid ""
+"On NFS filesystems with UID mapping enabled, B<open>() may return a file "
+"descriptor but, for example, B<read>(2) requests are denied with "
+"B<EACCES>. This is because the client performs B<open>() by checking the "
+"permissions, but UID mapping is performed by the server upon read and write "
+"requests."
+msgstr ""
+"UID マッピングを使用している NFS ファイルシステムでは、 B<open>() がファイル"
+"ディスクリプタを返した場合でも B<read>(2) が B<EACCES> で拒否される場合があ"
+"る。 これはクライアントがアクセス許可のチェックを行って B<open>() を実行する"
+"が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
+"る。"
+
+#. type: SS
+#: build/C/man2/open.2:1223
+#, no-wrap
+msgid "File access mode"
+msgstr "ファイルアクセスモード"
+
+#. type: Plain text
+#: build/C/man2/open.2:1238
+msgid ""
+"Unlike the other values that can be specified in I<flags>, the I<access "
+"mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR> do not specify "
+"individual bits. Rather, they define the low order two bits of I<flags>, "
+"and are defined respectively as 0, 1, and 2. In other words, the "
+"combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
+"not have the same meaning as B<O_RDWR>."
+msgstr ""
+"「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
+"定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
+"I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
+"れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
+"み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。"
+
+#. See for example util-linux's disk-utils/setfdprm.c
+#. For some background on access mode 3, see
+#. http://thread.gmane.org/gmane.linux.kernel/653123
+#. "[RFC] correct flags to f_mode conversion in __dentry_open"
+#. LKML, 12 Mar 2008
+#. type: Plain text
+#: build/C/man2/open.2:1255
+msgid ""
+"Linux reserves the special, nonstandard access mode 3 (binary 11) in "
+"I<flags> to mean: check for read and write permission on the file and return "
+"a descriptor that can't be used for reading or writing. This nonstandard "
+"access mode is used by some Linux drivers to return a descriptor that is to "
+"be used only for device-specific B<ioctl>(2) operations."
+msgstr ""
+"Linux では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約"
+"されており I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの"
+"読み出し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディ"
+"スクリプタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、"
+"デバイス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使わ"
+"れている。"
+
+#. type: SS
+#: build/C/man2/open.2:1255
+#, no-wrap
+msgid "Rationale for openat() and other directory file descriptor APIs"
+msgstr "openat() や他のディレクトリファイルディスクリプタ API の基本原理"
+
+#. type: Plain text
+#: build/C/man2/open.2:1283
+msgid ""
+"B<openat>() and the other system calls and library functions that take a "
+"directory file descriptor argument (i.e., B<faccessat>(2), "
+"B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), "
+"B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), "
+"B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), "
+"B<unlinkat>(2), B<utimensat>(2) B<mkfifoat>(3), and B<scandirat>(3)) are "
+"supported for two reasons. Here, the explanation is in terms of the "
+"B<openat>() call, but the rationale is analogous for the other interfaces."
+msgstr ""
+"B<openat>() やディレクトリファイルディスクリプタを引き数を取る他のシステム"
+"コールやライブラリ関数 (B<faccessat>(2), B<fanotify_mark>(2), "
+"B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), "
+"B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), "
+"B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), "
+"B<utimensat>(2) B<mkfifoat>(3), B<scandirat>(3)) は二つの理由から用意されてい"
+"る。 ここでは、 B<openat> コールに関して説明するが、この基本原理は他のイン"
+"ターフェースでも同じである。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1301
+msgid ""
+"First, B<openat>() allows an application to avoid race conditions that "
+"could occur when using B<open>() to open files in directories other than "
+"the current working directory. These race conditions result from the fact "
+"that some component of the directory prefix given to B<open>() could be "
+"changed in parallel with the call to B<open>(). Such races can be avoided "
+"by opening a file descriptor for the target directory, and then specifying "
+"that file descriptor as the I<dirfd> argument of B<openat>()."
+msgstr ""
+"最初の理由として、 B<openat>() を使うと、 アプリケーションは、 カレントワーキ"
+"ングディレクトリ以外のディレクトリで B<open>() を使ってファイルをオープンする"
+"際に起こり得る競合条件を避けることができる。 これらの競合条件は、 B<open>() "
+"に渡されたディレクトリプレフィックスの構成要素が B<open>() の呼び出しと並行し"
+"て変化する可能性があるという点に由来している。 このような競合条件は、 対象の"
+"ディレクトリに対するファイルディスクリプタをオープンし、 それから "
+"B<openat>() の I<dirfd> 引き数としてそのファイルディスクリプタを指定すること"
+"で、 避けることができる。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1312
+msgid ""
+"Second, B<openat>() allows the implementation of a per-thread \"current "
+"working directory\", via file descriptor(s) maintained by the application. "
+"(This functionality can also be obtained by tricks based on the use of I</"
+"proc/self/fd/>dirfd, but less efficiently.)"
+msgstr ""
+"二つ目として、 B<openat>() を使うと、アプリケーションが管理するファイルディス"
+"クリプタにより、 スレッド単位の「カレントワーキングディレクトリ」を実装するこ"
+"とができる (この機能は、 I</proc/self/fd/dirfd> を使った方法でも実現すること"
+"ができるが、 効率の面で落とる)。"
+
+#. type: SS
+#: build/C/man2/open.2:1312
+#, no-wrap
+msgid "O_DIRECT"
+msgstr "O_DIRECT"
+
+#. type: Plain text
+#: build/C/man2/open.2:1329
+msgid ""
+"The B<O_DIRECT> flag may impose alignment restrictions on the length and "
+"address of user-space buffers and the file offset of I/Os. In Linux "
+"alignment restrictions vary by filesystem and kernel version and might be "
+"absent entirely. However there is currently no filesystem-independent "
+"interface for an application to discover these restrictions for a given file "
+"or filesystem. Some filesystems provide their own interfaces for doing so, "
+"for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
+msgstr ""
+"B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
+"ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
+"は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
+"り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
+"ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
+"リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
+"い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
+"が 提供されている。例えば、 B<xfsctl>(3) の B<XFS_IOC_DIOINFO> 命令である。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1339
+#, fuzzy
+#| msgid ""
+#| "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
+#| "the file offset must all be multiples of the logical block size of the "
+#| "filesystem. Under Linux 2.6, alignment to 512-byte boundaries suffices."
+msgid ""
+"Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
+"the file offset must all be multiples of the logical block size of the "
+"filesystem. Since Linux 2.6.0, alignment to the logical block size of the "
+"underlying storage (typically 512 bytes) suffices. The logical block size "
+"can be determined using the B<ioctl>(2) B<BLKSSZGET> operation or from the "
+"shell using the command:"
+msgstr ""
+"Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
+"セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
+"Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1341
+#, no-wrap
+msgid " blockdev --getss\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open.2:1375
+msgid ""
+"B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2) "
+"system call, if the memory buffer is a private mapping (i.e., any mapping "
+"created with the B<mmap>(2) B<MAP_PRIVATE> flag; this includes memory "
+"allocated on the heap and statically allocated buffers). Any such I/Os, "
+"whether submitted via an asynchronous I/O interface or from another thread "
+"in the process, should be completed before B<fork>(2) is called. Failure "
+"to do so can result in data corruption and undefined behavior in parent and "
+"child processes. This restriction does not apply when the memory buffer for "
+"the B<O_DIRECT> I/Os was created using B<shmat>(2) or B<mmap>(2) with the "
+"B<MAP_SHARED> flag. Nor does this restriction apply when the memory buffer "
+"has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
+"will not be available to the child after B<fork>(2)."
+msgstr ""
+"メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
+"フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
+"B<fork>(2) システムコールと同時に決して実行すべきではない \n"
+"(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
+"割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
+"やプロセス内の他のスレッドから発行された、このような I/O は、\n"
+"B<fork>(2) が呼び出される前に完了されるべきである。\n"
+"そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
+"動作が起こる可能性がある。\n"
+"B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
+"付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
+"B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
+"ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
+"バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
+"のである)。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1385
+msgid ""
+"The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
+"restrictions similar to those of Linux 2.4. IRIX has also a B<fcntl>(2) "
+"call to query appropriate alignments, and sizes. FreeBSD 4.x introduced a "
+"flag of the same name, but without alignment restrictions."
+msgstr ""
+"B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
+"(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
+"サイズを取得するための B<fcntl>(2) コールがある。 FreeBSD 4.x も同じ名前のフ"
+"ラグを導入したが、アラインメントの制限はない。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1394
+msgid ""
+"B<O_DIRECT> support was added under Linux in kernel version 2.4.10. Older "
+"Linux kernels simply ignore this flag. Some filesystems may not implement "
+"the flag and B<open>() will fail with B<EINVAL> if it is used."
+msgstr ""
+"B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
+"る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
+"ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
+"と B<open>() は B<EINVAL> で失敗する。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1405
+msgid ""
+"Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
+"file, and especially to overlapping byte regions in the same file. Even "
+"when the filesystem correctly handles the coherency issues in this "
+"situation, overall I/O throughput is likely to be slower than using either "
+"mode alone. Likewise, applications should avoid mixing B<mmap>(2) of files "
+"with direct I/O to the same files."
+msgstr ""
+"アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
+"て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
+"テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
+"も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
+"あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2) と直接 "
+"I/O (B<O_DIRECT>) を混ぜて使うのも避けるべきである。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1427
+msgid ""
+"The behaviour of B<O_DIRECT> with NFS will differ from local filesystems. "
+"Older kernels, or kernels configured in certain ways, may not support this "
+"combination. The NFS protocol does not support passing the flag to the "
+"server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
+"the server may still cache the I/O. The client asks the server to make the "
+"I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>. Some "
+"servers will perform poorly under these circumstances, especially if the I/O "
+"size is small. Some servers may also be configured to lie to clients about "
+"the I/O having reached stable storage; this will avoid the performance "
+"penalty at some risk to data integrity in the event of server power "
+"failure. The Linux NFS client places no alignment restrictions on "
+"B<O_DIRECT> I/O."
+msgstr ""
+"NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
+"う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
+"と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
+"サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
+"のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
+"るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
+"バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
+"下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
+"は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
+"のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
+"危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
+"の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1434
+msgid ""
+"In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
+"with caution. It is recommended that applications treat use of B<O_DIRECT> "
+"as a performance option which is disabled by default."
+msgstr ""
+"まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
+"性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
+"いる性能向上のためのオプションと 考えておくのがよいであろう。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1439
+msgid ""
+"\"The thing that has always disturbed me about O_DIRECT is that the whole "
+"interface is just stupid, and was probably designed by a deranged monkey on "
+"some serious mind-controlling substances.\"\\(emLinus"
+msgstr ""
+"「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
+"危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
+"な」 \\(em Linus"
+
+#. FIXME . Check bugzilla report on open(O_ASYNC)
+#. See http://bugzilla.kernel.org/show_bug.cgi?id=5993
+#. type: Plain text
+#: build/C/man2/open.2:1451
+msgid ""
+"Currently, it is not possible to enable signal-driven I/O by specifying "
+"B<O_ASYNC> when calling B<open>(); use B<fcntl>(2) to enable this flag."
+msgstr ""
+"現在のところ、 B<open>() の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
+"O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2) を使用"
+"すること。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1459
+msgid ""
+"One must check for two different error codes, B<EISDIR> and B<ENOENT>, when "
+"trying to determine whether the kernel supports B<O_TMPFILE> functionality."
+msgstr ""
+"カーネルが B<O_TMPFILE> 機能をサポートしているかを判定する際に、 B<EISDIR> "
+"と B<ENOENT> の 2 つのエラーコードをチェックしなければならない。"
+
+#. type: Plain text
+#: build/C/man2/open.2:1481
+msgid ""
+"B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
+"B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
+"B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
+"B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
+msgstr ""
+"B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
+"B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
+"B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
+"B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
+
+#. type: TH
+#: build/C/man2/open_by_handle_at.2:25
+#, no-wrap
+msgid "OPEN_BY_HANDLE_AT"
+msgstr "OPEN_BY_HANDLE_AT"
+
+#. type: TH
+#: build/C/man2/open_by_handle_at.2:25 build/C/man2/rename.2:33
+#, no-wrap
+msgid "2014-05-08"
+msgstr "2014-05-08"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:29
+msgid ""
+"name_to_handle_at, open_by_handle_at - obtain handle for a pathname and open "
+"file via a handle"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:35
+#, no-wrap
+msgid ""
+"B<#define _GNU_SOURCE>\n"
+"B<#include E<lt>sys/types.hE<gt>>\n"
+"B<#include E<lt>sys/stat.hE<gt>>\n"
+"B<#include E<lt>fcntl.hE<gt>>\n"
+msgstr ""
+"B<#define _GNU_SOURCE>\n"
+"B<#include E<lt>sys/types.hE<gt>>\n"
+"B<#include E<lt>sys/stat.hE<gt>>\n"
+"B<#include E<lt>fcntl.hE<gt>>\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:39
+#, no-wrap
+msgid ""
+"B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
+"B< struct file_handle *>I<handle>B<,>\n"
+"B< int *>I<mount_id>B<, int >I<flags>B<);>\n"
+msgstr ""
+"B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
+"B< struct file_handle *>I<handle>B<,>\n"
+"B< int *>I<mount_id>B<, int >I<flags>B<);>\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:42
+#, no-wrap
+msgid ""
+"B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
+"B< int >I<flags>B<);>\n"
+msgstr ""
+"B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
+"B< int >I<flags>B<);>\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:59
+msgid ""
+"The B<name_to_handle_at>() and B<open_by_handle_at>() system calls split "
+"the functionality of B<openat>(2) into two parts: B<name_to_handle_at>() "
+"returns an opaque handle that corresponds to a specified file; "
+"B<open_by_handle_at>() opens the file corresponding to a handle returned by "
+"a previous call to B<name_to_handle_at>() and returns an open file "
+"descriptor."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/open_by_handle_at.2:59
+#, no-wrap
+msgid "name_to_handle_at()"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:71
+msgid ""
+"The B<name_to_handle_at>() system call returns a file handle and a mount ID "
+"corresponding to the file specified by the I<dirfd> and I<pathname> "
+"arguments. The file handle is returned via the argument I<handle>, which is "
+"a pointer to a structure of the following form:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:80
+#, no-wrap
+msgid ""
+"struct file_handle {\n"
+" unsigned int handle_bytes; /* Size of f_handle [in, out] */\n"
+" int handle_type; /* Handle type [out] */\n"
+" unsigned char f_handle[0]; /* File identifier (sized by\n"
+" caller) [out] */\n"
+"};\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:99
+msgid ""
+"It is the caller's responsibility to allocate the structure with a size "
+"large enough to hold the handle returned in I<f_handle>. Before the call, "
+"the I<handle_bytes> field should be initialized to contain the allocated "
+"size for I<f_handle>. (The constant B<MAX_HANDLE_SZ>, defined in "
+"I<E<lt>fcntl.hE<gt>>, specifies the maximum possible size for a file "
+"handle.) Upon successful return, the I<handle_bytes> field is updated to "
+"contain the number of bytes actually written to I<f_handle>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:112
+msgid ""
+"The caller can discover the required size for the I<file_handle> structure "
+"by making a call in which I<handle-E<gt>handle_bytes> is zero; in this case, "
+"the call fails with the error B<EOVERFLOW> and I<handle-E<gt>handle_bytes> "
+"is set to indicate the required size; the caller can then use this "
+"information to allocate a structure of the correct size (see EXAMPLE below)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:123
+msgid ""
+"Other than the use of the I<handle_bytes> field, the caller should treat the "
+"I<file_handle> structure as an opaque data type: the I<handle_type> and "
+"I<f_handle> fields are needed only by a subsequent call to "
+"B<open_by_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:131
+msgid ""
+"The I<flags> argument is a bit mask constructed by ORing together zero or "
+"more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:138
+msgid ""
+"Together, the I<pathname> and I<dirfd> arguments identify the file for which "
+"a handle is to be obtained. There are four distinct cases:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:146
+msgid ""
+"If I<pathname> is a nonempty string containing an absolute pathname, then a "
+"handle is returned for the file referred to by that pathname. In this case, "
+"I<dirfd> is ignored."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:157
+msgid ""
+"If I<pathname> is a nonempty string containing a relative pathname and "
+"I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is interpreted "
+"relative to the current working directory of the caller, and a handle is "
+"returned for the file to which it refers."
+msgstr ""
+"I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 "
+"B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリ"
+"に対する相対パスと解釈され、 そのファイルを参照するハンドルが返される。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:170
+msgid ""
+"If I<pathname> is a nonempty string containing a relative pathname and "
+"I<dirfd> is a file descriptor referring to a directory, then I<pathname> is "
+"interpreted relative to the directory referred to by I<dirfd>, and a handle "
+"is returned for the file to which it refers. (See B<openat>(3) for an "
+"explanation of why \"directory file descriptors\" are useful.)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:184
+msgid ""
+"If I<pathname> is an empty string and I<flags> specifies the value "
+"B<AT_EMPTY_PATH>, then I<dirfd> can be an open file descriptor referring to "
+"any type of file, or B<AT_FDCWD>, meaning the current working directory, and "
+"a handle is returned for the file to which it refers."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:196
+msgid ""
+"The I<mount_id> argument returns an identifier for the filesystem mount that "
+"corresponds to I<pathname>. This corresponds to the first field in one of "
+"the records in I</proc/self/mountinfo>. Opening the pathname in the fifth "
+"field of that record yields a file descriptor for the mount point; that file "
+"descriptor can be used in a subsequent call to B<open_by_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:209
+msgid ""
+"By default, B<name_to_handle_at>() does not dereference I<pathname> if it "
+"is a symbolic link, and thus returns a handle for the link itself. If "
+"B<AT_SYMLINK_FOLLOW> is specified in I<flags>, I<pathname> is dereferenced "
+"if it is a symbolic link (so that the call returns a handle for the file "
+"referred to by the link)."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/open_by_handle_at.2:209
+#, no-wrap
+msgid "open_by_handle_at()"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:216
+msgid ""
+"The B<open_by_handle_at>() system call opens the file referred to by "
+"I<handle>, a file handle returned by a previous call to "
+"B<name_to_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:226
+msgid ""
+"The I<mount_fd> argument is a file descriptor for any object (file, "
+"directory, etc.) in the mounted filesystem with respect to which I<handle> "
+"should be interpreted. The special value B<AT_FDCWD> can be specified, "
+"meaning the current working directory of the caller."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:239
+msgid ""
+"The I<flags> argument is as for B<open>(2). If I<handle> refers to a "
+"symbolic link, the caller must specify the B<O_PATH> flag, and the symbolic "
+"link is not dereferenced; the B<O_NOFOLLOW> flag, if specified, is ignored."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:245
+msgid ""
+"The caller must have the B<CAP_DAC_READ_SEARCH> capability to invoke "
+"B<open_by_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:252
+msgid ""
+"On success, B<name_to_handle_at>() returns 0, and B<open_by_handle_at>() "
+"returns a nonnegative file descriptor."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:256
+msgid ""
+"In the event of an error, both system calls return -1 and set I<errno> to "
+"indicate the cause of the error."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:263
+msgid ""
+"B<name_to_handle_at>() and B<open_by_handle_at>() can fail for the same "
+"errors as B<openat>(2). In addition, they can fail with the errors noted "
+"below."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:266
+msgid "B<name_to_handle_at>() can fail with the following errors:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:273
+msgid ""
+"I<pathname>, I<mount_id>, or I<handle> points outside your accessible "
+"address space."
+msgstr ""
+"I<pathname>, I<mount_id>, I<handle> のどれかがアクセス可能なアドレス空間の外"
+"を指している。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:277
+msgid "I<flags> includes an invalid bit value."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:282
+msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:289
+msgid ""
+"I<pathname> is an empty string, but B<AT_EMPTY_PATH> was not specified in "
+"I<flags>."
+msgstr ""
+"I<pathname> が空文字列だが、 I<flags> に B<AT_EMPTY_PATH> がされていなかっ"
+"た。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:301
+msgid ""
+"The file descriptor supplied in I<dirfd> does not refer to a directory, and "
+"it is not the case that both I<flags> includes B<AT_EMPTY_PATH> and "
+"I<pathname> is an empty string."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:304
+msgid ""
+"The filesystem does not support decoding of a pathname to a file handle."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:314
+msgid ""
+"The I<handle-E<gt>handle_bytes> value passed into the call was too small. "
+"When this error occurs, I<handle-E<gt>handle_bytes> is updated to indicate "
+"the required size for the handle."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:317
+msgid "B<open_by_handle_at>() can fail with the following errors:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:321
+msgid "I<mount_fd> is not an open file descriptor."
+msgstr "I<mount_fd> がオープンされたファイルディスクリプタでない。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:325
+msgid "I<handle> points outside your accessible address space."
+msgstr "I<handle> がアクセス可能なアドレス空間の外を指している。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:331
+msgid ""
+"I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ> or is equal to "
+"zero."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:338
+msgid ""
+"I<handle> refers to a symbolic link, but B<O_PATH> was not specified in "
+"I<flags>."
+msgstr ""
+"I<handle> がシンボリックリンクを参照しているが、 I<flags> に B<O_PATH> がされ"
+"ていなかった。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:343
+msgid "The caller does not have the B<CAP_DAC_READ_SEARCH> capability."
+msgstr "呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていない。"
+
+#. type: TP
+#: build/C/man2/open_by_handle_at.2:343
+#, no-wrap
+msgid "B<ESTALE>"
+msgstr "B<ESTALE>"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:349
+msgid ""
+"The specified I<handle> is not valid. This error will occur if, for "
+"example, the file has been deleted."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:352
+msgid ""
+"These system calls first appeared in Linux 2.6.39. Library support is "
+"provided in glibc since version 2.14."
+msgstr ""
+"これらのシステムコールは Linux 2.6.39 で初めて登場した。ライブラリによるサ"
+"ポートはバージョン 2.14 以降の glibc で提供されている。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:354
+msgid "These system calls are nonstandard Linux extensions."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:359
+msgid ""
+"FreeBSD has a broadly similar pair of system calls in the form of "
+"B<getfh>() and B<openfh>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:364
+msgid ""
+"A file handle can be generated in one process using B<name_to_handle_at>() "
+"and later used in a different process that calls B<open_by_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:370
+msgid ""
+"Some filesystem don't support the translation of pathnames to file handles, "
+"for example, I</proc>, I</sys>, and various network filesystems."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:377
+msgid ""
+"A file handle may become invalid (\"stale\") if a file is deleted, or for "
+"other filesystem-specific reasons. Invalid handles are notified by an "
+"B<ESTALE> error from B<open_by_handle_at>()."
+msgstr ""
+
+#. https://lwn.net/Articles/375888/
+#. "Open by handle" - Jonathan Corbet, 2010-02-23
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:387
+msgid ""
+"These system calls are designed for use by user-space file servers. For "
+"example, a user-space NFS server might generate a file handle and pass it to "
+"an NFS client. Later, when the client wants to open the file, it could pass "
+"the handle back to the server. This sort of functionality allows a user-"
+"space file server to operate in a stateless fashion with respect to the "
+"files it serves."
+msgstr ""
+
+#. commit bcda76524cd1fa32af748536f27f674a13e56700
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:409
+msgid ""
+"If I<pathname> refers to a symbolic link and I<flags> does not specify "
+"B<AT_SYMLINK_FOLLOW>, then B<name_to_handle_at>() returns a handle for the "
+"link (rather than the file to which it refers). The process receiving the "
+"handle can later perform operations on the symbolic link by converting the "
+"handle to a file descriptor using B<open_by_handle_at>() with the B<O_PATH> "
+"flag, and then passing the file descriptor as the I<dirfd> argument in "
+"system calls such as B<readlinkat>(2) and B<fchownat>(2)."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/open_by_handle_at.2:409
+#, no-wrap
+msgid "Obtaining a persistent filesystem ID"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:423
+msgid ""
+"The mount IDs in I</proc/self/mountinfo> can be reused as filesystems are "
+"unmounted and mounted. Therefore, the mount ID returned by "
+"B<name_to_handle_at>() (in I<*mount_id>) should not be treated as a "
+"persistent identifier for the corresponding mounted filesystem. However, an "
+"application can use the information in the I<mountinfo> record that "
+"corresponds to the mount ID to derive a persistent identifier."
+msgstr ""
+
+#. e.g., http://stackoverflow.com/questions/6748429/using-libblkid-to-find-uuid-of-a-partition
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:439
+msgid ""
+"For example, one can use the device name in the fifth field of the "
+"I<mountinfo> record to search for the corresponding device UUID via the "
+"symbolic links in I</dev/disks/by-uuid>. (A more comfortable way of "
+"obtaining the UUID is to use the B<libblkid>(3) library.) That process can "
+"then be reversed, using the UUID to look up the device name, and then "
+"obtaining the corresponding mount point, in order to produce the I<mount_fd> "
+"argument used by B<open_by_handle_at>()."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:451
+msgid ""
+"The two programs below demonstrate the use of B<name_to_handle_at>() and "
+"B<open_by_handle_at>(). The first program (I<t_name_to_handle_at.c>) uses "
+"B<name_to_handle_at>() to obtain the file handle and mount ID for the file "
+"specified in its command-line argument; the handle and mount ID are written "
+"to standard output."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:471
+msgid ""
+"The second program (I<t_open_by_handle_at.c>) reads a mount ID and file "
+"handle from standard input. The program then employs "
+"B<open_by_handle_at>() to open the file using that handle. If an optional "
+"command-line argument is supplied, then the I<mount_fd> argument for "
+"B<open_by_handle_at>() is obtained by opening the directory named in that "
+"argument. Otherwise, I<mount_fd> is obtained by scanning I</proc/self/"
+"mountinfo> to find a record whose mount ID matches the mount ID read from "
+"standard input, and the mount directory specified in that record is opened. "
+"(These programs do not deal with the fact that mount IDs are not persistent.)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:473
+msgid "The following shell session demonstrates the use of these two programs:"
+msgstr "以下のシェルセッションは、これら 2 つのプログラムの使用例である。"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:483
+#, no-wrap
+msgid ""
+"$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
+"$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
+"$ B<./t_open_by_handle_at E<lt> fh>\n"
+"open_by_handle_at: Operation not permitted\n"
+"$ B<sudo ./t_open_by_handle_at E<lt> fh> # Need CAP_SYS_ADMIN\n"
+"Read 31 bytes\n"
+"$ B<rm cecilia.txt>\n"
+msgstr ""
+"$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
+"$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
+"$ B<./t_open_by_handle_at E<lt> fh>\n"
+"open_by_handle_at: Operation not permitted\n"
+"$ B<sudo ./t_open_by_handle_at E<lt> fh> # Need CAP_SYS_ADMIN\n"
+"Read 31 bytes\n"
+"$ B<rm cecilia.txt>\n"
+
+#. Christoph Hellwig: That's why the file handles contain a generation
+#. counter that gets incremented in this case.
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:494
+msgid ""
+"Now we delete and (quickly) re-create the file so that it has the same "
+"content and (by chance) the same inode. Nevertheless, "
+"B<open_by_handle_at>() recognizes that the original file referred to by the "
+"file handle no longer exists."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:505
+#, no-wrap
+msgid ""
+"$ B<stat --printf=\"%i\\en\" cecilia.txt> # Display inode number\n"
+"4072121\n"
+"$ B<rm cecilia.txt>\n"
+"$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
+"$ B<stat --printf=\"%i\\en\" cecilia.txt> # Check inode number\n"
+"4072121\n"
+"$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
+"open_by_handle_at: Stale NFS file handle\n"
+msgstr ""
+"$ B<stat --printf=\"%i\\en\" cecilia.txt> # Display inode number\n"
+"4072121\n"
+"$ B<rm cecilia.txt>\n"
+"$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
+"$ B<stat --printf=\"%i\\en\" cecilia.txt> # Check inode number\n"
+"4072121\n"
+"$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
+"open_by_handle_at: Stale NFS file handle\n"
+
+#. type: SS
+#: build/C/man2/open_by_handle_at.2:507
+#, no-wrap
+msgid "Program source: t_name_to_handle_at.c"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:519
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>sys/types.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"#include E<lt>errno.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+msgstr ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>sys/types.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"#include E<lt>errno.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:522 build/C/man2/open_by_handle_at.2:595
+#, no-wrap
+msgid ""
+"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
+" } while (0)\n"
+msgstr ""
+"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
+" } while (0)\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:529
+#, no-wrap
+msgid ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" struct file_handle *fhp;\n"
+" int mount_id, fhsize, flags, dirfd, j;\n"
+" char *pathname;\n"
+msgstr ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" struct file_handle *fhp;\n"
+" int mount_id, fhsize, flags, dirfd, j;\n"
+" char *pathname;\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:534
+#, no-wrap
+msgid ""
+" if (argc != 2) {\n"
+" fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" if (argc != 2) {\n"
+" fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:536
+#, no-wrap
+msgid " pathname = argv[1];\n"
+msgstr " pathname = argv[1];\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:538
+#, no-wrap
+msgid " /* Allocate file_handle structure */\n"
+msgstr " /* Allocate file_handle structure */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:543
+#, no-wrap
+msgid ""
+" fhsize = sizeof(*fhp);\n"
+" fhp = malloc(fhsize);\n"
+" if (fhp == NULL)\n"
+" errExit(\"malloc\");\n"
+msgstr ""
+" fhsize = sizeof(*fhp);\n"
+" fhp = malloc(fhsize);\n"
+" if (fhp == NULL)\n"
+" errExit(\"malloc\");\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:546
+#, no-wrap
+msgid ""
+" /* Make an initial call to name_to_handle_at() to discover\n"
+" the size required for file handle */\n"
+msgstr ""
+" /* Make an initial call to name_to_handle_at() to discover\n"
+" the size required for file handle */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:555
+#, no-wrap
+msgid ""
+" dirfd = AT_FDCWD; /* For name_to_handle_at() calls */\n"
+" flags = 0; /* For name_to_handle_at() calls */\n"
+" fhp-E<gt>handle_bytes = 0;\n"
+" if (name_to_handle_at(dirfd, pathname, fhp,\n"
+" &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
+" fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" dirfd = AT_FDCWD; /* For name_to_handle_at() calls */\n"
+" flags = 0; /* For name_to_handle_at() calls */\n"
+" fhp-E<gt>handle_bytes = 0;\n"
+" if (name_to_handle_at(dirfd, pathname, fhp,\n"
+" &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
+" fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:557
+#, no-wrap
+msgid " /* Reallocate file_handle structure with correct size */\n"
+msgstr " /* Reallocate file_handle structure with correct size */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:562
+#, no-wrap
+msgid ""
+" fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
+" fhp = realloc(fhp, fhsize); /* Copies fhp-E<gt>handle_bytes */\n"
+" if (fhp == NULL)\n"
+" errExit(\"realloc\");\n"
+msgstr ""
+" fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
+" fhp = realloc(fhp, fhsize); /* Copies fhp-E<gt>handle_bytes */\n"
+" if (fhp == NULL)\n"
+" errExit(\"realloc\");\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:564
+#, no-wrap
+msgid " /* Get file handle from pathname supplied on command line */\n"
+msgstr " /* Get file handle from pathname supplied on command line */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:567
+#, no-wrap
+msgid ""
+" if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
+" errExit(\"name_to_handle_at\");\n"
+msgstr ""
+" if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
+" errExit(\"name_to_handle_at\");\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:570
+#, no-wrap
+msgid ""
+" /* Write mount ID, file handle size, and file handle to stdout,\n"
+" for later reuse by t_open_by_handle_at.c */\n"
+msgstr ""
+" /* Write mount ID, file handle size, and file handle to stdout,\n"
+" for later reuse by t_open_by_handle_at.c */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:576
+#, no-wrap
+msgid ""
+" printf(\"%d\\en\", mount_id);\n"
+" printf(\"%d %d \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
+" for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
+" printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
+" printf(\"\\en\");\n"
+msgstr ""
+" printf(\"%d\\en\", mount_id);\n"
+" printf(\"%d %d \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
+" for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
+" printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
+" printf(\"\\en\");\n"
+
+#. type: SS
+#: build/C/man2/open_by_handle_at.2:580
+#, no-wrap
+msgid "Program source: t_open_by_handle_at.c"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:592
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>sys/types.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>limits.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+msgstr ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>sys/types.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>limits.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:601
+#, no-wrap
+msgid ""
+"/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
+" \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
+" \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
+" Open the corresponding mount path and return the resulting file\n"
+" descriptor. */\n"
+msgstr ""
+"/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
+" \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
+" \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
+" Open the corresponding mount path and return the resulting file\n"
+" descriptor. */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:611
+#, no-wrap
+msgid ""
+"static int\n"
+"open_mount_path_by_id(int mount_id)\n"
+"{\n"
+" char *linep;\n"
+" size_t lsize;\n"
+" char mount_path[PATH_MAX];\n"
+" int mi_mount_id, found;\n"
+" ssize_t nread;\n"
+" FILE *fp;\n"
+msgstr ""
+"static int\n"
+"open_mount_path_by_id(int mount_id)\n"
+"{\n"
+" char *linep;\n"
+" size_t lsize;\n"
+" char mount_path[PATH_MAX];\n"
+" int mi_mount_id, found;\n"
+" ssize_t nread;\n"
+" FILE *fp;\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:615
+#, no-wrap
+msgid ""
+" fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
+" if (fp == NULL)\n"
+" errExit(\"fopen\");\n"
+msgstr ""
+" fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
+" if (fp == NULL)\n"
+" errExit(\"fopen\");\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:622
+#, no-wrap
+msgid ""
+" found = 0;\n"
+" linep = NULL;\n"
+" while (!found) {\n"
+" nread = getline(&linep, &lsize, fp);\n"
+" if (nread == -1)\n"
+" break;\n"
+msgstr ""
+" found = 0;\n"
+" linep = NULL;\n"
+" while (!found) {\n"
+" nread = getline(&linep, &lsize, fp);\n"
+" if (nread == -1)\n"
+" break;\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:629
+#, no-wrap
+msgid ""
+" nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
+" &mi_mount_id, mount_path);\n"
+" if (nread != 2) {\n"
+" fprintf(stderr, \"Bad sscanf()\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
+" &mi_mount_id, mount_path);\n"
+" if (nread != 2) {\n"
+" fprintf(stderr, \"Bad sscanf()\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:634
+#, no-wrap
+msgid ""
+" if (mi_mount_id == mount_id)\n"
+" found = 1;\n"
+" }\n"
+" free(linep);\n"
+msgstr ""
+" if (mi_mount_id == mount_id)\n"
+" found = 1;\n"
+" }\n"
+" free(linep);\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:636
+#, no-wrap
+msgid " fclose(fp);\n"
+msgstr " fclose(fp);\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:641
+#, no-wrap
+msgid ""
+" if (!found) {\n"
+" fprintf(stderr, \"Could not find mount point\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" if (!found) {\n"
+" fprintf(stderr, \"Could not find mount point\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:644
+#, no-wrap
+msgid ""
+" return open(mount_path, O_RDONLY);\n"
+"}\n"
+msgstr ""
+" return open(mount_path, O_RDONLY);\n"
+"}\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:655
+#, no-wrap
+msgid ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" struct file_handle *fhp;\n"
+" int mount_id, fd, mount_fd, handle_bytes, j;\n"
+" ssize_t nread;\n"
+" char buf[1000];\n"
+"#define LINE_SIZE 100\n"
+" char line1[LINE_SIZE], line2[LINE_SIZE];\n"
+" char *nextp;\n"
+msgstr ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" struct file_handle *fhp;\n"
+" int mount_id, fd, mount_fd, handle_bytes, j;\n"
+" ssize_t nread;\n"
+" char buf[1000];\n"
+"#define LINE_SIZE 100\n"
+" char line1[LINE_SIZE], line2[LINE_SIZE];\n"
+" char *nextp;\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:660
+#, no-wrap
+msgid ""
+" if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
+" fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
+" fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:662
+#, no-wrap
+msgid " /* Standard input contains mount ID and file handle information:\n"
+msgstr " /* Standard input contains mount ID and file handle information:\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:666
+#, no-wrap
+msgid ""
+" Line 1: E<lt>mount_idE<gt>\n"
+" Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt> E<lt>bytes of handle in hexE<gt>\n"
+" */\n"
+msgstr ""
+" Line 1: E<lt>mount_idE<gt>\n"
+" Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt> E<lt>bytes of handle in hexE<gt>\n"
+" */\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:672
+#, no-wrap
+msgid ""
+" if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
+" (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
+" fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+" if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
+" (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
+" fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:674
+#, no-wrap
+msgid " mount_id = atoi(line1);\n"
+msgstr " mount_id = atoi(line1);\n"
+
+#. type: Plain text
+#: build/C/man2/open_by_handle_at.2:676