Whamcloud - gitweb
15bcd4246c70bd92609ee316cdfe7549aac83042
[fs/lustre-release.git] / lustre / include / linux / obd_psdev.h
1 #ifndef __LINUX_OBD_PSDEV_H
2 #define __LINUX_OBD_PSDEV_H
3
4 #define OBD_PSDEV_MAJOR 120
5
6 #define ISLENTO (current->pid == psdev_vcomm.vc_pid)
7
8 /* communication pending & processing queues */
9 struct vcomm {
10         unsigned int        vc_seq;
11         struct wait_queue  *vc_waitq;     /* Lento wait queue */
12         struct list_head    vc_pending;
13         struct list_head    vc_processing;
14         int                 vc_inuse;
15         int                 vc_pid;       /* Lento's pid */
16 };
17
18 extern void obd_psdev_detach(int unit);
19 extern int  init_obd_psdev(void);
20 struct vcomm psdev_vcomm;
21
22 /* messages between presto filesystem in kernel and Venus */
23 extern int presto_hard;
24 extern unsigned long presto_timeout;
25
26 #define REQ_READ   1
27 #define REQ_WRITE  2
28 #define REQ_ASYNC  4
29
30 struct upc_req {
31         struct list_head   rq_chain;
32         caddr_t            rq_data;
33         u_short            rq_flags;
34         u_short            rq_read_size;  /* Size is at most 5000 bytes */
35         u_short            rq_rep_size;
36         u_short            rq_opcode;  /* copied from data to save lookup */
37         int                rq_unique;
38         struct wait_queue  *rq_sleep;   /* process' wait queue */
39         unsigned long      rq_posttime;
40 };
41
42 #endif /* __LINUX_OBD_PSDEV_H */