1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001 Cluster File Systems, Inc.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
13 #include <linux/lustre_idl.h>
14 #include <linux/lustre_dlm.h>
16 struct mds_client_data;
17 struct mds_idmap_table;
19 struct mds_export_data {
20 struct list_head med_open_head;
21 spinlock_t med_open_lock;
22 struct mds_client_data *med_mcd;
25 unsigned int med_initialized:1,
29 struct mds_idmap_table *med_idmap;
34 struct obd_device *oscc_obd;
38 struct ldlm_export_data {
39 struct list_head led_held_locks; /* protected by namespace lock */
42 struct ec_export_data { /* echo client */
43 struct list_head eced_locks;
46 /* In-memory access to client data from OST struct */
47 struct filter_client_data;
49 struct filter_export_data {
50 spinlock_t fed_lock; /* protects fed_open_head */
52 struct filter_client_data *fed_fcd;
55 long fed_dirty; /* in bytes */
56 long fed_grant; /* in bytes */
57 long fed_pending; /* bytes just being written */
61 struct portals_handle exp_handle;
62 atomic_t exp_refcount;
63 atomic_t exp_rpc_count;
64 struct obd_uuid exp_client_uuid;
65 struct list_head exp_obd_chain;
66 struct obd_device *exp_obd;
67 struct obd_import *exp_imp_reverse; /* to make RPCs backwards */
68 struct ptlrpc_connection *exp_connection;
70 struct ldlm_export_data exp_ldlm_data;
71 struct list_head exp_outstanding_replies;
72 time_t exp_last_request_time;
73 spinlock_t exp_lock; /* protects flags int below */
74 /* ^ protects exp_outstanding_replies too */
75 unsigned long exp_flags;
77 exp_req_replay_needed:1,
78 exp_lock_replay_needed:1,
80 exp_libclient:1, /* liblustre client? */
83 struct mds_export_data eu_mds_data;
84 struct filter_export_data eu_filter_data;
85 struct ec_export_data eu_ec_data;
89 #define exp_mds_data u.eu_mds_data
90 #define exp_lov_data u.eu_lov_data
91 #define exp_filter_data u.eu_filter_data
92 #define exp_ec_data u.eu_ec_data
94 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
95 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
97 #endif /* __EXPORT_H */