Whamcloud - gitweb
- More Peter's additions for the ha manager. This doesn't seem to break much -
[fs/lustre-release.git] / lustre / include / linux / lustre_ha.h
1 #ifndef _LUSTRE_HA_H
2 #define _LUSTRE_HA_H
3
4 #define MGR_STOPPING   1
5 #define MGR_RUNNING    2
6 #define MGR_STOPPED    4
7 #define MGR_KILLED     8
8 #define MGR_EVENT      16
9 #define MGR_WORKING    32
10 #define MGR_SIGNAL     64
11
12 struct lustre_ha_mgr {
13         __u32               mgr_flags; 
14         struct task_struct *mgr_thread;
15         wait_queue_head_t   mgr_waitq;
16         wait_queue_head_t   mgr_ctl_waitq;
17         spinlock_t          mgr_lock;
18         time_t              mgr_waketime;
19         struct list_head    mgr_connections_lh;  /* connections managed by the mgr */
20         struct list_head    mgr_troubled_lh;  /* connections in trouble */
21 };
22
23 struct lustre_ha_thread { 
24         char                 *name;
25         struct lustre_ha_mgr *mgr; 
26         struct obd_device    *dev;
27 }; 
28
29 int llite_ha_cleanup(struct lustre_ha_mgr *mgr);
30 struct lustre_ha_mgr *llite_ha_setup(void);
31 void llite_ha_conn_fail(struct ptlrpc_client *cli);
32 void llite_ha_conn_manage(struct lustre_ha_mgr *mgr, struct ptlrpc_client *cli);
33
34
35 #endif