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_local:1;
28 /* simple idmapping */
29 spinlock_t med_idmap_lock;
30 struct mds_idmap_table *med_idmap;
35 struct list_head oscc_list;
36 struct obd_device *oscc_obd;
37 obd_id oscc_last_id;//last available pre-created object
38 obd_id oscc_next_id;// what object id to give out next
41 int oscc_max_grow_count;
42 int oscc_kick_barrier;
43 struct osc_created *oscc_osccd;
46 wait_queue_head_t oscc_waitq; /* creating procs wait on this */
49 struct ldlm_export_data {
50 struct list_head led_held_locks; /* protected by namespace lock */
53 struct ec_export_data { /* echo client */
54 struct list_head eced_locks;
57 /* In-memory access to client data from OST struct */
58 struct filter_client_data;
60 struct filter_export_data {
61 spinlock_t fed_lock; /* protects fed_open_head */
63 struct filter_client_data *fed_fcd;
66 unsigned long fed_dirty; /* in bytes */
67 unsigned long fed_grant; /* in bytes */
68 unsigned long fed_pending; /* bytes just being written */
72 struct portals_handle exp_handle;
73 atomic_t exp_refcount;
74 atomic_t exp_rpc_count;
75 struct obd_uuid exp_client_uuid;
76 struct list_head exp_obd_chain;
77 struct obd_device *exp_obd;
78 struct obd_import *exp_imp_reverse; /* to make RPCs backwards */
79 struct ptlrpc_connection *exp_connection;
81 struct ldlm_export_data exp_ldlm_data;
82 struct list_head exp_outstanding_replies;
83 time_t exp_last_request_time;
84 spinlock_t exp_lock; /* protects flags int below */
85 /* ^ protects exp_outstanding_replies too */
86 unsigned long exp_flags;
89 exp_libclient:1; /* liblustre client? */
91 struct mds_export_data eu_mds_data;
92 struct filter_export_data eu_filter_data;
93 struct ec_export_data eu_ec_data;
97 #define exp_mds_data u.eu_mds_data
98 #define exp_lov_data u.eu_lov_data
99 #define exp_filter_data u.eu_filter_data
100 #define exp_ec_data u.eu_ec_data
102 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
103 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
105 #endif /* __EXPORT_H */