Skip to contentSkip to conversation

relayfs (3/4) (VFS and scheme-specific code)

RFC PATCH New Tom Zanussi 1 participant 1 message Oct 7, 2003 VFS

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 relayfs (3/4) (VFS and scheme-specific code)

fs/Kconfig +20 -0
diff -urpN -X dontdiff linux-2.6.0-test6/fs/Kconfig linux-2.6.0-test6.cur/fs/Kconfig
@@ -892,6 +892,26 @@ config RAMFS
 	  To compile this as a module, choose M here: the module will be called
 	  ramfs.
 
+config RELAYFS_FS
+	tristate "Relayfs file system support"
+	---help---
+	  Relayfs is a high-speed data relay filesystem designed to provide
+	  an efficient mechanism for tools and facilities to relay large
+	  amounts of data from kernel space to user space.  It's not useful
+	  on its own, and should only be enabled if other facilities that
+	  need it are enabled, such as for example dynamic printk or the
+	  Linux Trace Toolkit.
+
+	  See <file:Documentation/filesystems/relayfs.txt> for further
+	  information.
+
+	  This file system is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called relayfs.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
 endmenu
 
 menu "Miscellaneous filesystems"
fs/Makefile +1 -0
diff -urpN -X dontdiff linux-2.6.0-test6/fs/Makefile linux-2.6.0-test6.cur/fs/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_EXT2_FS)		+= ext2/
 obj-$(CONFIG_CRAMFS)		+= cramfs/
 obj-$(CONFIG_RAMFS)		+= ramfs/
 obj-$(CONFIG_HUGETLBFS)		+= hugetlbfs/
+obj-$(CONFIG_RELAYFS_FS)	+= relayfs/
 obj-$(CONFIG_CODA_FS)		+= coda/
 obj-$(CONFIG_INTERMEZZO_FS)	+= intermezzo/
 obj-$(CONFIG_MINIX_FS)		+= minix/
fs/relayfs/Makefile +7 -0
diff -urpN -X dontdiff linux-2.6.0-test6/fs/relayfs/Makefile linux-2.6.0-test6.cur/fs/relayfs/Makefile
@@ -0,0 +1,7 @@
+#
+# relayfs Makefile
+#
+
+obj-$(CONFIG_RELAYFS_FS) += relayfs.o
+
+relayfs-objs := relay.o relay_lockless.o relay_locking.o inode.o
fs/relayfs/inode.c +572 -0

572 lines not on this page · raw message

fs/relayfs/relay_locking.c +248 -0

248 lines not on this page · raw message

fs/relayfs/relay_locking.h +32 -0
diff -urpN -X dontdiff linux-2.6.0-test6/fs/relayfs/relay_locking.h linux-2.6.0-test6.cur/fs/relayfs/relay_locking.h
@@ -0,0 +1,32 @@
+#ifndef _RELAY_LOCKING_H
+#define _RELAY_LOCKING_H
+
+extern char *
+locking_reserve(struct rchan *rchan,
+		u32 slot_len, 
+		struct timeval *time_stamp,
+		u32 *tsc,
+		int *err,
+		int *interrupting);
+
+extern void 
+locking_commit(struct rchan *rchan,
+	       char *from,
+	       u32 len, 
+	       int deliver, 
+	       int interrupting);
+
+extern void 
+locking_resume(struct rchan *rchan);
+
+extern void 
+locking_finalize(struct rchan *rchan);
+
+extern u32 
+locking_get_offset(struct rchan *rchan, u32 *max_offset);
+
+extern void 
+locking_reset(struct rchan *rchan,
+	      int init);
+
+#endif	/* _RELAY_LOCKING_H */
fs/relayfs/relay_lockless.c +499 -0

499 lines not on this page · raw message

fs/relayfs/relay_lockless.h +32 -0
diff -urpN -X dontdiff linux-2.6.0-test6/fs/relayfs/relay_lockless.h linux-2.6.0-test6.cur/fs/relayfs/relay_lockless.h
@@ -0,0 +1,32 @@
+#ifndef _RELAY_LOCKLESS_H
+#define _RELAY_LOCKLESS_H
+
+extern char *
+lockless_reserve(struct rchan *rchan,
+		 u32 slot_len,
+		 struct timeval *time_stamp,
+		 u32 *tsc,
+		 int * interrupting,
+		 int * errcode);
+
+extern void 
+lockless_commit(struct rchan *rchan,
+		char * from,
+		u32 len, 
+		int deliver, 
+		int interrupting);
+
+extern void 
+lockless_resume(struct rchan *rchan);
+
+extern void 
+lockless_finalize(struct rchan *rchan);
+
+extern u32 
+lockless_get_offset(struct rchan *rchan, u32 *max_offset);
+
+extern void
+lockless_reset(struct rchan *rchan,
+	       int init);
+
+#endif/* _RELAY_LOCKLESS_H */
Signature · 4 lines
Regards,

Tom Zanussi <[email protected]>
IBM Linux Technology Center/RAS