]> err.no Git - linux-2.6/blobdiff - include/linux/relayfs_fs.h
[ALSA] Fix snd_xxx_t typedefs
[linux-2.6] / include / linux / relayfs_fs.h
index 8200ecbe6e0f51f039a8b73390c0cb55a2b3a1ec..7342e66247fbe120b2a2f0fcb6ffd63ebb20d004 100644 (file)
@@ -110,6 +110,46 @@ struct rchan_callbacks
         */
         void (*buf_unmapped)(struct rchan_buf *buf,
                             struct file *filp);
+       /*
+        * create_buf_file - create file to represent a relayfs channel buffer
+        * @filename: the name of the file to create
+        * @parent: the parent of the file to create
+        * @mode: the mode of the file to create
+        * @buf: the channel buffer
+        * @is_global: outparam - set non-zero if the buffer should be global
+        *
+        * Called during relay_open(), once for each per-cpu buffer,
+        * to allow the client to create a file to be used to
+        * represent the corresponding channel buffer.  If the file is
+        * created outside of relayfs, the parent must also exist in
+        * that filesystem.
+        *
+        * The callback should return the dentry of the file created
+        * to represent the relay buffer.
+        *
+        * Setting the is_global outparam to a non-zero value will
+        * cause relay_open() to create a single global buffer rather
+        * than the default set of per-cpu buffers.
+        *
+        * See Documentation/filesystems/relayfs.txt for more info.
+        */
+       struct dentry *(*create_buf_file)(const char *filename,
+                                         struct dentry *parent,
+                                         int mode,
+                                         struct rchan_buf *buf,
+                                         int *is_global);
+
+       /*
+        * remove_buf_file - remove file representing a relayfs channel buffer
+        * @dentry: the dentry of the file to remove
+        *
+        * Called during relay_close(), once for each per-cpu buffer,
+        * to allow the client to remove a file used to represent a
+        * channel buffer.
+        *
+        * The callback should return 0 if successful, negative if not.
+        */
+       int (*remove_buf_file)(struct dentry *dentry);
 };
 
 /*
@@ -239,10 +279,9 @@ static inline void subbuf_start_reserve(struct rchan_buf *buf,
 }
 
 /*
- * exported relayfs file operations, fs/relayfs/inode.c
+ * exported relay file operations, fs/relayfs/inode.c
  */
-
-extern struct file_operations relayfs_file_operations;
+extern struct file_operations relay_file_operations;
 
 #endif /* _LINUX_RELAYFS_FS_H */