Whamcloud - gitweb
Add LOV export handle to reference open handles.
[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 #ifdef __KERNEL__
14
15 #include <linux/lustre_idl.h>
16 #include <linux/lustre_dlm.h>
17 #include <linux/obd_filter.h>
18
19 struct lov_export_data {
20         struct list_head led_open_head;
21 };
22
23 struct obd_export {
24         __u64                     exp_cookie;
25         struct lustre_handle      exp_impconnh;
26         struct list_head          exp_obd_chain;
27         struct list_head          exp_conn_chain;
28         struct obd_device        *exp_obd;
29         struct ptlrpc_connection *exp_connection;
30         struct ldlm_export_data   exp_ldlm_data;  /* can this go inside u? */
31         union {
32                 struct mds_export_data    eu_mds_data;
33                 struct filter_export_data eu_filter_data;
34                 struct lov_export_data    eu_lov_data;
35         } u;
36         void                     *exp_data; /* device specific data */
37         int                       exp_desclen;
38         char                     *exp_desc;
39         obd_uuid_t                exp_uuid;
40 };
41
42 #define exp_mds_data    u.eu_mds_data
43 #define exp_lov_data    u.eu_lov_data
44 #define exp_filter_data u.eu_filter_data
45
46 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
47 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
48 #endif /* __KERNEL__ */
49
50 #endif /* __EXPORT_H */