summaryrefslogtreecommitdiff
path: root/include/linux/relay.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2020-12-15 20:45:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 22:46:18 -0800
commit371e03880d9d34534d3eafd2a7581042be598e39 (patch)
tree3f65ecc330a5b657ccf18fa540d5c79866f8c492 /include/linux/relay.h
parent6f8f25440d791855e8b6a26cd2bff9d738468416 (diff)
relay: make create_buf_file and remove_buf_file callbacks mandatory
All clients provide create_buf_file and remove_buf_file callbacks, and they're required for relay to make sense. There is no point in them being optional. Also document whether each callback is mandatory/optional. Link: https://lkml.kernel.org/r/88003c1527386b93036e286e7917f1e33aec84ac.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> Suggested-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@kernel.dk> Cc: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/relay.h')
-rw-r--r--include/linux/relay.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/relay.h b/include/linux/relay.h
index b3c4f49f6951..99d024475ba5 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -89,6 +89,8 @@ struct rchan_callbacks
* The client should return 1 to continue logging, 0 to stop
* logging.
*
+ * This callback is optional.
+ *
* NOTE: subbuf_start will also be invoked when the buffer is
* created, so that the first sub-buffer can be initialized
* if necessary. In this case, prev_subbuf will be NULL.
@@ -122,6 +124,8 @@ struct rchan_callbacks
* cause relay_open() to create a single global buffer rather
* than the default set of per-cpu buffers.
*
+ * This callback is mandatory.
+ *
* See Documentation/filesystems/relay.rst for more info.
*/
struct dentry *(*create_buf_file)(const char *filename,
@@ -139,6 +143,8 @@ struct rchan_callbacks
* channel buffer.
*
* The callback should return 0 if successful, negative if not.
+ *
+ * This callback is mandatory.
*/
int (*remove_buf_file)(struct dentry *dentry);
};