/*
- * linux/include/linux/relay.h
+ * linux/include/linux/relayfs_fs.h
*
* Copyright (C) 2002, 2003 - Tom Zanussi (zanussi@us.ibm.com), IBM Corp
* Copyright (C) 1999, 2000, 2001, 2002 - Karim Yaghmour (karim@opersys.com)
*
- * CONFIG_RELAY definitions and declarations
+ * RelayFS definitions and declarations
*/
-#ifndef _LINUX_RELAY_H
-#define _LINUX_RELAY_H
+#ifndef _LINUX_RELAYFS_FS_H
+#define _LINUX_RELAYFS_FS_H
#include <linux/config.h>
#include <linux/types.h>
#include <linux/poll.h>
#include <linux/kref.h>
-/* Needs a _much_ better name... */
-#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
-
/*
* Tracks changes to rchan/rchan_buf structs
*/
size_t prev_padding);
/*
- * buf_mapped - relay buffer mmap notification
+ * buf_mapped - relayfs buffer mmap notification
* @buf: the channel buffer
- * @filp: relay file pointer
+ * @filp: relayfs file pointer
*
- * Called when a relay file is successfully mmapped
+ * Called when a relayfs file is successfully mmapped
*/
void (*buf_mapped)(struct rchan_buf *buf,
struct file *filp);
/*
- * buf_unmapped - relay buffer unmap notification
+ * buf_unmapped - relayfs buffer unmap notification
* @buf: the channel buffer
- * @filp: relay file pointer
+ * @filp: relayfs file pointer
*
- * Called when a relay file is successfully unmapped
+ * Called when a relayfs file is successfully unmapped
*/
void (*buf_unmapped)(struct rchan_buf *buf,
struct file *filp);
/*
- * create_buf_file - create file to represent a relay channel buffer
+ * 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
* 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 relay, the parent must also exist in
+ * created outside of relayfs, the parent must also exist in
* that filesystem.
*
* The callback should return the dentry of the file created
int *is_global);
/*
- * remove_buf_file - remove file representing a relay channel buffer
+ * 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,
};
/*
- * CONFIG_RELAY kernel API, kernel/relay.c
+ * relayfs kernel API, fs/relayfs/relay.c
*/
struct rchan *relay_open(const char *base_filename,
extern size_t relay_switch_subbuf(struct rchan_buf *buf,
size_t length);
+extern struct dentry *relayfs_create_dir(const char *name,
+ struct dentry *parent);
+extern int relayfs_remove_dir(struct dentry *dentry);
+extern struct dentry *relayfs_create_file(const char *name,
+ struct dentry *parent,
+ int mode,
+ struct file_operations *fops,
+ void *data);
+extern int relayfs_remove_file(struct dentry *dentry);
/**
* relay_write - write data into the channel
}
/*
- * exported relay file operations, kernel/relay.c
+ * exported relay file operations, fs/relayfs/inode.c
*/
extern struct file_operations relay_file_operations;
-#endif /* _LINUX_RELAY_H */
+#endif /* _LINUX_RELAYFS_FS_H */