1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Linux Filesystems API</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="next" href="vfs.html" title="Chapter 1. The Linux VFS"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Linux Filesystems API</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="vfs.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a name="Linux-filesystems-API"></a>Linux Filesystems API</h1></div><div><div class="legalnotice"><a name="idp1101232036"></a><p> 2 This documentation is free software; you can redistribute 3 it and/or modify it under the terms of the GNU General Public 4 License as published by the Free Software Foundation; either 5 version 2 of the License, or (at your option) any later 6 version. 7 </p><p> 8 This program is distributed in the hope that it will be 9 useful, but WITHOUT ANY WARRANTY; without even the implied 10 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 See the GNU General Public License for more details. 12 </p><p> 13 You should have received a copy of the GNU General Public 14 License along with this program; if not, write to the Free 15 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 16 MA 02111-1307 USA 17 </p><p> 18 For more details see the file COPYING in the source 19 distribution of Linux. 20 </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="vfs.html">1. The Linux VFS</a></span></dt><dd><dl><dt><span class="sect1"><a href="vfs.html#the_filesystem_types">The Filesystem types</a></span></dt><dt><span class="sect1"><a href="the_directory_cache.html">The Directory Cache</a></span></dt><dt><span class="sect1"><a href="inode_handling.html">Inode Handling</a></span></dt><dt><span class="sect1"><a href="registration_and_superblocks.html">Registration and Superblocks</a></span></dt><dt><span class="sect1"><a href="file_locks.html">File Locks</a></span></dt><dt><span class="sect1"><a href="other_functions.html">Other Functions</a></span></dt></dl></dd><dt><span class="chapter"><a href="proc.html">2. The proc filesystem</a></span></dt><dd><dl><dt><span class="sect1"><a href="proc.html#sysctl_interface">sysctl interface</a></span></dt><dt><span class="sect1"><a href="proc_filesystem_interface.html">proc filesystem interface</a></span></dt></dl></dd><dt><span class="chapter"><a href="fs_events.html">3. Events based on file descriptors</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-eventfd-signal.html"><span class="phrase">eventfd_signal</span></a></span><span class="refpurpose"> — 21 Adds <em class="parameter"><code>n</code></em> to the eventfd counter. 22 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-get.html"><span class="phrase">eventfd_ctx_get</span></a></span><span class="refpurpose"> — 23 Acquires a reference to the internal eventfd context. 24 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-put.html"><span class="phrase">eventfd_ctx_put</span></a></span><span class="refpurpose"> — 25 Releases a reference to the internal eventfd context. 26 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-remove-wait-queue.html"><span class="phrase">eventfd_ctx_remove_wait_queue</span></a></span><span class="refpurpose"> — 27 Read the current counter and removes wait queue. 28 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-read.html"><span class="phrase">eventfd_ctx_read</span></a></span><span class="refpurpose"> — 29 Reads the eventfd counter or wait if it is zero. 30 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-fget.html"><span class="phrase">eventfd_fget</span></a></span><span class="refpurpose"> — 31 Acquire a reference of an eventfd file descriptor. 32 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-fdget.html"><span class="phrase">eventfd_ctx_fdget</span></a></span><span class="refpurpose"> — 33 Acquires a reference to the internal eventfd context. 34 </span></dt><dt><span class="refentrytitle"><a href="API-eventfd-ctx-fileget.html"><span class="phrase">eventfd_ctx_fileget</span></a></span><span class="refpurpose"> — 35 Acquires a reference to the internal eventfd context. 36 </span></dt></dl></dd><dt><span class="chapter"><a href="sysfs.html">4. The Filesystem for Exporting Kernel Objects</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-sysfs-create-file-ns.html"><span class="phrase">sysfs_create_file_ns</span></a></span><span class="refpurpose"> — 37 create an attribute file for an object with custom ns 38 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-add-file-to-group.html"><span class="phrase">sysfs_add_file_to_group</span></a></span><span class="refpurpose"> — 39 add an attribute file to a pre-existing group. 40 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-chmod-file.html"><span class="phrase">sysfs_chmod_file</span></a></span><span class="refpurpose"> — 41 update the modified mode value on an object attribute. 42 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-remove-file-ns.html"><span class="phrase">sysfs_remove_file_ns</span></a></span><span class="refpurpose"> — 43 remove an object attribute with a custom ns tag 44 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-remove-file-from-group.html"><span class="phrase">sysfs_remove_file_from_group</span></a></span><span class="refpurpose"> — 45 remove an attribute file from a group. 46 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-create-bin-file.html"><span class="phrase">sysfs_create_bin_file</span></a></span><span class="refpurpose"> — 47 create binary file for object. 48 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-remove-bin-file.html"><span class="phrase">sysfs_remove_bin_file</span></a></span><span class="refpurpose"> — 49 remove binary file for object. 50 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-create-link.html"><span class="phrase">sysfs_create_link</span></a></span><span class="refpurpose"> — 51 create symlink between two objects. 52 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-remove-link.html"><span class="phrase">sysfs_remove_link</span></a></span><span class="refpurpose"> — 53 remove symlink in object's directory. 54 </span></dt><dt><span class="refentrytitle"><a href="API-sysfs-rename-link-ns.html"><span class="phrase">sysfs_rename_link_ns</span></a></span><span class="refpurpose"> — 55 rename symlink in object's directory. 56 </span></dt></dl></dd><dt><span class="chapter"><a href="debugfs.html">5. The debugfs filesystem</a></span></dt><dd><dl><dt><span class="sect1"><a href="debugfs.html#debugfs_interface">debugfs interface</a></span></dt></dl></dd><dt><span class="chapter"><a href="LinuxJDBAPI.html">6. The Linux Journalling API</a></span></dt><dd><dl><dt><span class="sect1"><a href="LinuxJDBAPI.html#journaling_overview">Overview</a></span></dt><dd><dl><dt><span class="sect2"><a href="LinuxJDBAPI.html#journaling_details">Details</a></span></dt><dt><span class="sect2"><a href="LinuxJDBAPI.html#jbd_summary">Summary</a></span></dt></dl></dd><dt><span class="sect1"><a href="data_types.html">Data Types</a></span></dt><dd><dl><dt><span class="sect2"><a href="data_types.html#structures">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="functions.html">Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="functions.html#journal_level">Journal Level</a></span></dt><dt><span class="sect2"><a href="functions.html#transaction_level">Transasction Level</a></span></dt></dl></dd><dt><span class="sect1"><a href="see_also.html">See also</a></span></dt></dl></dd><dt><span class="chapter"><a href="splice.html">7. splice API</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-splice-to-pipe.html"><span class="phrase">splice_to_pipe</span></a></span><span class="refpurpose"> — 57 fill passed data into a pipe 58 </span></dt><dt><span class="refentrytitle"><a href="API-generic-file-splice-read.html"><span class="phrase">generic_file_splice_read</span></a></span><span class="refpurpose"> — 59 splice data from file to a pipe 60 </span></dt><dt><span class="refentrytitle"><a href="API-splice-from-pipe-feed.html"><span class="phrase">splice_from_pipe_feed</span></a></span><span class="refpurpose"> — 61 feed available data from a pipe to a file 62 </span></dt><dt><span class="refentrytitle"><a href="API-splice-from-pipe-next.html"><span class="phrase">splice_from_pipe_next</span></a></span><span class="refpurpose"> — 63 wait for some data to splice from 64 </span></dt><dt><span class="refentrytitle"><a href="API-splice-from-pipe-begin.html"><span class="phrase">splice_from_pipe_begin</span></a></span><span class="refpurpose"> — 65 start splicing from pipe 66 </span></dt><dt><span class="refentrytitle"><a href="API-splice-from-pipe-end.html"><span class="phrase">splice_from_pipe_end</span></a></span><span class="refpurpose"> — 67 finish splicing from pipe 68 </span></dt><dt><span class="refentrytitle"><a href="API---splice-from-pipe.html"><span class="phrase">__splice_from_pipe</span></a></span><span class="refpurpose"> — 69 splice data from a pipe to given actor 70 </span></dt><dt><span class="refentrytitle"><a href="API-splice-from-pipe.html"><span class="phrase">splice_from_pipe</span></a></span><span class="refpurpose"> — 71 splice data from a pipe to a file 72 </span></dt><dt><span class="refentrytitle"><a href="API-iter-file-splice-write.html"><span class="phrase">iter_file_splice_write</span></a></span><span class="refpurpose"> — 73 splice data from a pipe to a file 74 </span></dt><dt><span class="refentrytitle"><a href="API-generic-splice-sendpage.html"><span class="phrase">generic_splice_sendpage</span></a></span><span class="refpurpose"> — 75 splice data from a pipe to a socket 76 </span></dt><dt><span class="refentrytitle"><a href="API-splice-direct-to-actor.html"><span class="phrase">splice_direct_to_actor</span></a></span><span class="refpurpose"> — 77 splices data directly between two non-pipes 78 </span></dt><dt><span class="refentrytitle"><a href="API-do-splice-direct.html"><span class="phrase">do_splice_direct</span></a></span><span class="refpurpose"> — 79 splices data directly between two files 80 </span></dt></dl></dd><dt><span class="chapter"><a href="pipes.html">8. pipes API</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-struct-pipe-buffer.html"><span class="phrase">struct pipe_buffer</span></a></span><span class="refpurpose"> — 81 a linux kernel pipe buffer 82 </span></dt><dt><span class="refentrytitle"><a href="API-struct-pipe-inode-info.html"><span class="phrase">struct pipe_inode_info</span></a></span><span class="refpurpose"> — 83 a linux kernel pipe 84 </span></dt><dt><span class="refentrytitle"><a href="API-generic-pipe-buf-steal.html"><span class="phrase">generic_pipe_buf_steal</span></a></span><span class="refpurpose"> — 85 attempt to take ownership of a <span class="structname">pipe_buffer</span> 86 </span></dt><dt><span class="refentrytitle"><a href="API-generic-pipe-buf-get.html"><span class="phrase">generic_pipe_buf_get</span></a></span><span class="refpurpose"> — 87 get a reference to a <span class="structname">struct pipe_buffer</span> 88 </span></dt><dt><span class="refentrytitle"><a href="API-generic-pipe-buf-confirm.html"><span class="phrase">generic_pipe_buf_confirm</span></a></span><span class="refpurpose"> — 89 verify contents of the pipe buffer 90 </span></dt><dt><span class="refentrytitle"><a href="API-generic-pipe-buf-release.html"><span class="phrase">generic_pipe_buf_release</span></a></span><span class="refpurpose"> — 91 put a reference to a <span class="structname">struct pipe_buffer</span> 92 </span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="vfs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. The Linux VFS</td></tr></table></div></body></html> 93