diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/relayfs_fs.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index 8200ecbe6e0f..8c2177105857 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
@@ -110,6 +110,40 @@ struct rchan_callbacks | |||
110 | */ | 110 | */ |
111 | void (*buf_unmapped)(struct rchan_buf *buf, | 111 | void (*buf_unmapped)(struct rchan_buf *buf, |
112 | struct file *filp); | 112 | struct file *filp); |
113 | /* | ||
114 | * create_buf_file - create file to represent a relayfs channel buffer | ||
115 | * @filename: the name of the file to create | ||
116 | * @parent: the parent of the file to create | ||
117 | * @mode: the mode of the file to create | ||
118 | * @buf: the channel buffer | ||
119 | * | ||
120 | * Called during relay_open(), once for each per-cpu buffer, | ||
121 | * to allow the client to create a file to be used to | ||
122 | * represent the corresponding channel buffer. If the file is | ||
123 | * created outside of relayfs, the parent must also exist in | ||
124 | * that filesystem. | ||
125 | * | ||
126 | * The callback should return the dentry of the file created | ||
127 | * to represent the relay buffer. | ||
128 | * | ||
129 | * See Documentation/filesystems/relayfs.txt for more info. | ||
130 | */ | ||
131 | struct dentry *(*create_buf_file)(const char *filename, | ||
132 | struct dentry *parent, | ||
133 | int mode, | ||
134 | struct rchan_buf *buf); | ||
135 | |||
136 | /* | ||
137 | * remove_buf_file - remove file representing a relayfs channel buffer | ||
138 | * @dentry: the dentry of the file to remove | ||
139 | * | ||
140 | * Called during relay_close(), once for each per-cpu buffer, | ||
141 | * to allow the client to remove a file used to represent a | ||
142 | * channel buffer. | ||
143 | * | ||
144 | * The callback should return 0 if successful, negative if not. | ||
145 | */ | ||
146 | int (*remove_buf_file)(struct dentry *dentry); | ||
113 | }; | 147 | }; |
114 | 148 | ||
115 | /* | 149 | /* |