diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/relayfs.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/filesystems/relayfs.txt b/Documentation/filesystems/relayfs.txt index d803abed29f0..0720a049d0b8 100644 --- a/Documentation/filesystems/relayfs.txt +++ b/Documentation/filesystems/relayfs.txt | |||
@@ -125,6 +125,8 @@ Here's a summary of the API relayfs provides to in-kernel clients: | |||
125 | relay_reset(chan) | 125 | relay_reset(chan) |
126 | relayfs_create_dir(name, parent) | 126 | relayfs_create_dir(name, parent) |
127 | relayfs_remove_dir(dentry) | 127 | relayfs_remove_dir(dentry) |
128 | relayfs_create_file(name, parent, mode, fops, data) | ||
129 | relayfs_remove_file(dentry) | ||
128 | 130 | ||
129 | channel management typically called on instigation of userspace: | 131 | channel management typically called on instigation of userspace: |
130 | 132 | ||
@@ -320,6 +322,27 @@ forces a sub-buffer switch on all the channel buffers, and can be used | |||
320 | to finalize and process the last sub-buffers before the channel is | 322 | to finalize and process the last sub-buffers before the channel is |
321 | closed. | 323 | closed. |
322 | 324 | ||
325 | Creating non-relay files | ||
326 | ------------------------ | ||
327 | |||
328 | relay_open() automatically creates files in the relayfs filesystem to | ||
329 | represent the per-cpu kernel buffers; it's often useful for | ||
330 | applications to be able to create their own files alongside the relay | ||
331 | files in the relayfs filesystem as well e.g. 'control' files much like | ||
332 | those created in /proc or debugfs for similar purposes, used to | ||
333 | communicate control information between the kernel and user sides of a | ||
334 | relayfs application. For this purpose the relayfs_create_file() and | ||
335 | relayfs_remove_file() API functions exist. For relayfs_create_file(), | ||
336 | the caller passes in a set of user-defined file operations to be used | ||
337 | for the file and an optional void * to a user-specified data item, | ||
338 | which will be accessible via inode->u.generic_ip (see the relay-apps | ||
339 | tarball for examples). The file_operations are a required parameter | ||
340 | to relayfs_create_file() and thus the semantics of these files are | ||
341 | completely defined by the caller. | ||
342 | |||
343 | See the relay-apps tarball at http://relayfs.sourceforge.net for | ||
344 | examples of how these non-relay files are meant to be used. | ||
345 | |||
323 | Misc | 346 | Misc |
324 | ---- | 347 | ---- |
325 | 348 | ||