aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/relayfs.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/relayfs.txt')
-rw-r--r--Documentation/filesystems/relayfs.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/filesystems/relayfs.txt b/Documentation/filesystems/relayfs.txt
index 0720a049d0b8..4221b3a52e25 100644
--- a/Documentation/filesystems/relayfs.txt
+++ b/Documentation/filesystems/relayfs.txt
@@ -143,6 +143,8 @@ Here's a summary of the API relayfs provides to in-kernel clients:
143 subbuf_start(buf, subbuf, prev_subbuf, prev_padding) 143 subbuf_start(buf, subbuf, prev_subbuf, prev_padding)
144 buf_mapped(buf, filp) 144 buf_mapped(buf, filp)
145 buf_unmapped(buf, filp) 145 buf_unmapped(buf, filp)
146 create_buf_file(filename, parent, mode, buf)
147 remove_buf_file(dentry)
146 148
147 helper functions: 149 helper functions:
148 150
@@ -343,6 +345,31 @@ completely defined by the caller.
343See the relay-apps tarball at http://relayfs.sourceforge.net for 345See the relay-apps tarball at http://relayfs.sourceforge.net for
344examples of how these non-relay files are meant to be used. 346examples of how these non-relay files are meant to be used.
345 347
348Creating relay files in other filesystems
349-----------------------------------------
350
351By default of course, relay_open() creates relay files in the relayfs
352filesystem. Because relay_file_operations is exported, however, it's
353also possible to create and use relay files in other pseudo-filesytems
354such as debugfs.
355
356For this purpose, two callback functions are provided,
357create_buf_file() and remove_buf_file(). create_buf_file() is called
358once for each per-cpu buffer from relay_open() to allow the client to
359create a file to be used to represent the corresponding buffer; if
360this callback is not defined, the default implementation will create
361and return a file in the relayfs filesystem to represent the buffer.
362The callback should return the dentry of the file created to represent
363the relay buffer. Note that the parent directory passed to
364relay_open() (and passed along to the callback), if specified, must
365exist in the same filesystem the new relay file is created in. If
366create_buf_file() is defined, remove_buf_file() must also be defined;
367it's responsible for deleting the file(s) created in create_buf_file()
368and is called during relay_close().
369
370See the 'exported-relayfile' examples in the relay-apps tarball for
371examples of creating and using relay files in debugfs.
372
346Misc 373Misc
347---- 374----
348 375