Whamcloud - gitweb
The noncontroversial portion of the last few days of changes:
[fs/lustre-release.git] / lustre / include / linux / lustre_ha.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4
5 #ifndef _LUSTRE_HA_H
6 #define _LUSTRE_HA_H
7
8 #include <linux/lustre_net.h>
9
10 #define MGR_STOPPING   1
11 #define MGR_RUNNING    2
12 #define MGR_STOPPED    4
13 #define MGR_KILLED     8
14 #define MGR_EVENT      16
15 #define MGR_WORKING    32
16 #define MGR_SIGNAL     64
17
18 #define LUSTRE_HA_NAME "ptlrpc"
19
20 #define CONNMGR_CONNECT 1
21
22 extern struct connmgr_obd *ptlrpc_connmgr;
23
24 struct connmgr_thread {
25         struct connmgr_obd *mgr;
26         char *name;
27 };
28
29 struct connmgr_body {
30         __u64 conn;
31         __u64 conn_token;
32
33         __u32 generation;
34 };
35
36 int connmgr_connect(struct connmgr_obd *mgr, struct ptlrpc_connection *conn);
37 int connmgr_handle(struct obd_device *dev, struct ptlrpc_service *svc,
38                    struct ptlrpc_request *req);
39 void connmgr_cli_fail(struct ptlrpc_client *cli);
40 void connmgr_cli_manage(struct connmgr_obd *mgr, struct ptlrpc_client *cli);
41 int recovd_setup(struct connmgr_obd *mgr);
42 int recovd_cleanup(struct connmgr_obd *mgr);
43
44 #endif