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>
11 /* Data stored per client in the last_rcvd file. In le32 order. */
12 struct mds_client_data;
14 struct mds_export_data {
15 struct list_head med_open_head;
16 spinlock_t med_open_lock; /* lock med_open_head, mfd_list*/
17 struct mds_client_data *med_mcd;
18 __u64 med_ibits_known;
25 struct list_head oscc_list;
26 struct obd_device *oscc_obd;
27 obd_id oscc_last_id;//last available pre-created object
28 obd_id oscc_next_id;// what object id to give out next
32 cfs_waitq_t oscc_waitq; /* creating procs wait on this */
35 struct ldlm_export_data {
36 struct list_head led_held_locks; /* protected by namespace lock */
39 struct ec_export_data { /* echo client */
40 struct list_head eced_locks;
43 /* In-memory access to client data from OST struct */
44 struct filter_client_data;
45 struct filter_export_data {
46 spinlock_t fed_lock; /* protects fed_open_head */
47 struct filter_client_data *fed_fcd;
50 long fed_dirty; /* in bytes */
51 long fed_grant; /* in bytes */
52 long fed_pending; /* bytes just being written */
56 struct portals_handle exp_handle;
57 atomic_t exp_refcount;
58 struct obd_uuid exp_client_uuid;
59 struct list_head exp_obd_chain;
60 /* exp_obd_chain_timed fo ping evictor, protected by obd_dev_lock */
61 struct list_head exp_obd_chain_timed;
62 struct obd_device *exp_obd;
63 struct obd_import *exp_imp_reverse; /* to make RPCs backwards */
64 struct ptlrpc_connection *exp_connection;
66 struct ldlm_export_data exp_ldlm_data;
67 struct list_head exp_outstanding_replies;
68 time_t exp_last_request_time;
69 spinlock_t exp_lock; /* protects flags int below */
70 /* ^ protects exp_outstanding_replies too */
71 __u64 exp_connect_flags;
73 unsigned int exp_failed:1,
77 exp_libclient:1; /* liblustre client? */
79 struct mds_export_data eu_mds_data;
80 struct filter_export_data eu_filter_data;
81 struct ec_export_data eu_ec_data;
85 #define exp_mds_data u.eu_mds_data
86 #define exp_lov_data u.eu_lov_data
87 #define exp_filter_data u.eu_filter_data
88 #define exp_ec_data u.eu_ec_data
90 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
91 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
93 #endif /* __EXPORT_H */