Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / include / linux / lustre_export.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2001  Cluster File Systems, Inc.
5  *
6  * This code is issued under the GNU General Public License.
7  * See the file COPYING in this distribution
8  */
9
10 #ifndef __EXPORT_H
11 #define __EXPORT_H
12
13 #include <linux/lustre_idl.h>
14 #include <linux/lustre_dlm.h>
15 #include <linux/lustre_mds.h>
16 #include <linux/obd_filter.h>
17
18 struct lov_export_data {
19         spinlock_t       led_lock;
20         struct list_head led_open_head;
21 };
22
23 struct ec_export_data { /* echo client */
24         struct list_head eced_open_head;
25         struct list_head eced_locks;
26 };
27
28 struct obd_export {
29         __u64                     exp_cookie;
30         struct obd_uuid           exp_client_uuid;
31         struct list_head          exp_obd_chain;
32         struct list_head          exp_conn_chain;
33         struct obd_device        *exp_obd;
34         struct ptlrpc_connection *exp_connection;
35         struct ldlm_export_data   exp_ldlm_data;
36         union {
37                 struct mds_export_data    eu_mds_data;
38                 struct filter_export_data eu_filter_data;
39                 struct lov_export_data    eu_lov_data;
40                 struct ec_export_data     eu_ec_data;
41         } u;
42 };
43
44 #define exp_mds_data    u.eu_mds_data
45 #define exp_lov_data    u.eu_lov_data
46 #define exp_filter_data u.eu_filter_data
47 #define exp_ec_data     u.eu_ec_data
48
49 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
50 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
51
52 #endif /* __EXPORT_H */