summaryrefslogtreecommitdiff
path: root/include/linux/intermezzo_psdev.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:33:15 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:33:15 -0800
commitd40d1af9f0aebf7e108f1dfb66ac5af671bc9719 (patch)
tree7a2518e82986a8eb5b4eb76553df04d8ba6e4642 /include/linux/intermezzo_psdev.h
parenta8a2069f432c5597bdf9c83ab3045b9ef32ab5e3 (diff)
v2.4.14.2 -> v2.4.14.3
- Alan Cox: more driver merging - Al Viro: make ext2 group allocation more readable
Diffstat (limited to 'include/linux/intermezzo_psdev.h')
-rw-r--r--include/linux/intermezzo_psdev.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/include/linux/intermezzo_psdev.h b/include/linux/intermezzo_psdev.h
new file mode 100644
index 000000000000..9b1e557bdd7a
--- /dev/null
+++ b/include/linux/intermezzo_psdev.h
@@ -0,0 +1,72 @@
+#ifndef __PRESTO_PSDEV_H
+#define __PRESTO_PSDEV_H
+
+#ifdef PRESTO_DEVEL
+# define PRESTO_FS_NAME "izofs"
+# define PRESTO_PSDEV_NAME "/dev/izo"
+# define PRESTO_PSDEV_MAJOR 186
+#else
+# define PRESTO_FS_NAME "InterMezzo"
+# define PRESTO_PSDEV_NAME "/dev/intermezzo"
+# define PRESTO_PSDEV_MAJOR 185
+#endif
+
+#define MAX_PRESTODEV 16
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
+#define wait_queue_head_t struct wait_queue *
+#define DECLARE_WAITQUEUE(name,task) \
+ struct wait_queue name = { task, NULL }
+#define init_waitqueue_head(arg)
+#else
+#ifndef __initfunc
+#define __initfunc(arg) arg
+#endif
+#endif
+
+
+/* represents state of a /dev/presto */
+/* communication pending & processing queues */
+struct upc_comm {
+ unsigned int uc_seq;
+ wait_queue_head_t uc_waitq; /* Lento wait queue */
+ struct list_head uc_pending;
+ struct list_head uc_processing;
+ int uc_pid; /* Lento's pid */
+ int uc_hard; /* allows signals during upcalls */
+ int uc_no_filter;
+ int uc_no_journal;
+ int uc_no_upcall;
+ int uc_timeout; /* . sec: signals will dequeue upc */
+ long uc_errorval; /* for testing I/O failures */
+ struct list_head uc_cache_list;
+ int uc_minor;
+ char * uc_devname;
+};
+
+#define ISLENTO(minor) (current->pid == upc_comms[minor].uc_pid \
+ || current->p_pptr->pid == upc_comms[minor].uc_pid)
+
+extern struct upc_comm upc_comms[MAX_PRESTODEV];
+
+/* messages between presto filesystem in kernel and Venus */
+#define REQ_READ 1
+#define REQ_WRITE 2
+#define REQ_ASYNC 4
+#define REQ_DEAD 8
+
+struct upc_req {
+ struct list_head rq_chain;
+ caddr_t rq_data;
+ u_short rq_flags;
+ u_short rq_bufsize;
+ u_short rq_rep_size;
+ u_short rq_opcode; /* copied from data to save lookup */
+ int rq_unique;
+ wait_queue_head_t rq_sleep; /* process' wait queue */
+ unsigned long rq_posttime;
+};
+
+#endif