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;
18 struct mds_export_data {
19 struct list_head med_open_head;
20 spinlock_t med_open_lock;
21 struct mds_client_data *med_mcd;
28 struct list_head oscc_list;
29 struct obd_device *oscc_obd;
30 obd_id oscc_last_id;//last available pre-created object
31 obd_id oscc_next_id;// what object id to give out next
33 struct osc_created *oscc_osccd;
36 wait_queue_head_t oscc_waitq; /* creating procs wait on this */
39 struct ldlm_export_data {
40 struct list_head led_held_locks; /* protected by namespace lock */
43 struct ec_export_data { /* echo client */
44 struct list_head eced_locks;
47 /* In-memory access to client data from OST struct */
48 struct filter_client_data;
49 struct filter_export_data {
50 spinlock_t fed_lock; /* protects fed_open_head */
51 struct filter_client_data *fed_fcd;
54 long fed_dirty; /* in bytes */
55 long fed_grant; /* in bytes */
56 long fed_pending; /* bytes just being written */
60 struct portals_handle exp_handle;
61 atomic_t exp_refcount;
62 struct obd_uuid exp_client_uuid;
63 struct list_head exp_obd_chain;
64 struct obd_device *exp_obd;
65 struct obd_import *exp_imp_reverse; /* to make RPCs backwards */
66 struct ptlrpc_connection *exp_connection;
68 struct ldlm_export_data exp_ldlm_data;
69 struct list_head exp_outstanding_replies;
70 time_t exp_last_request_time;
71 spinlock_t exp_lock; /* protects flags int below */
72 /* ^ protects exp_outstanding_replies too */
76 exp_libclient:1; /* liblustre client? */
78 struct mds_export_data eu_mds_data;
79 struct filter_export_data eu_filter_data;
80 struct ec_export_data eu_ec_data;
84 #define exp_mds_data u.eu_mds_data
85 #define exp_lov_data u.eu_lov_data
86 #define exp_filter_data u.eu_filter_data
87 #define exp_ec_data u.eu_ec_data
89 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
90 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
92 #endif /* __EXPORT_H */