X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Frelayfs_fs.h;fp=include%2Flinux%2Frelay.h;h=7342e66247fbe120b2a2f0fcb6ffd63ebb20d004;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=4bcc1531d6a9d812b774def51f926246393f2d3a;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/include/linux/relay.h b/include/linux/relayfs_fs.h similarity index 87% rename from include/linux/relay.h rename to include/linux/relayfs_fs.h index 4bcc1531d..7342e6624 100644 --- a/include/linux/relay.h +++ b/include/linux/relayfs_fs.h @@ -1,14 +1,14 @@ /* - * 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 #include @@ -19,9 +19,6 @@ #include #include -/* Needs a _much_ better name... */ -#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) - /* * Tracks changes to rchan/rchan_buf structs */ @@ -95,26 +92,26 @@ struct rchan_callbacks 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 @@ -124,7 +121,7 @@ struct rchan_callbacks * 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 @@ -143,7 +140,7 @@ struct rchan_callbacks 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, @@ -156,7 +153,7 @@ struct rchan_callbacks }; /* - * CONFIG_RELAY kernel API, kernel/relay.c + * relayfs kernel API, fs/relayfs/relay.c */ struct rchan *relay_open(const char *base_filename, @@ -174,6 +171,15 @@ extern int relay_buf_full(struct rchan_buf *buf); 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 @@ -273,9 +279,9 @@ static inline void subbuf_start_reserve(struct rchan_buf *buf, } /* - * 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 */