1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
8 #include <lustre/lustre_idl.h>
9 #include <lustre_dlm.h>
10 #include <lprocfs_status.h>
12 /* Data stored per client in the last_rcvd file. In le32 order. */
13 struct mds_client_data;
15 struct mds_export_data {
16 struct list_head med_open_head;
17 spinlock_t med_open_lock; /* lock med_open_head, mfd_list*/
18 struct mds_client_data *med_mcd;
19 __u64 med_ibits_known;
26 struct list_head oscc_list;
27 struct obd_device *oscc_obd;
28 obd_id oscc_last_id;//last available pre-created object
29 obd_id oscc_next_id;// what object id to give out next
33 cfs_waitq_t oscc_waitq; /* creating procs wait on this */
36 struct ldlm_export_data {
37 struct list_head led_held_locks; /* protected by led_lock below */
41 struct ec_export_data { /* echo client */
42 struct list_head eced_locks;
45 /* In-memory access to client data from OST struct */
46 struct filter_client_data;
47 struct filter_export_data {
48 spinlock_t fed_lock; /* protects fed_open_head */
49 struct filter_client_data *fed_fcd;
52 long fed_dirty; /* in bytes */
53 long fed_grant; /* in bytes */
54 struct list_head fed_mod_list; /* files being modified */
55 int fed_mod_count;/* items in fed_writing list */
56 long fed_pending; /* bytes just being written */
57 struct brw_stats fed_brw_stats;
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 hlist_node exp_uuid_hash; /* uuid-export hash*/
67 struct hlist_node exp_nid_hash; /* nid-export hash */
68 /* exp_obd_chain_timed fo ping evictor, protected by obd_dev_lock */
69 struct list_head exp_obd_chain_timed;
70 struct obd_device *exp_obd;
71 struct obd_import *exp_imp_reverse; /* to make RPCs backwards */
72 struct proc_dir_entry *exp_proc;
73 struct lprocfs_stats *exp_ops_stats;
74 struct lprocfs_stats *exp_ldlm_stats;
75 struct ptlrpc_connection *exp_connection;
77 struct ldlm_export_data exp_ldlm_data;
78 struct list_head exp_outstanding_replies;
79 time_t exp_last_request_time;
80 spinlock_t exp_lock; /* protects flags int below */
81 /* ^ protects exp_outstanding_replies too */
82 __u64 exp_connect_flags;
84 unsigned int exp_failed:1,
88 exp_need_sync:1, /* needs sync from connect */
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 */