+struct mgs_export_data {
+ cfs_list_t med_clients; /* mgc fs client via this exp */
+ cfs_spinlock_t med_lock; /* protect med_clients */
+};
+
+/**
+ * per-NID statistics structure.
+ * It tracks access patterns to this export on a per-client-NID basis
+ */
+typedef struct nid_stat {
+ lnet_nid_t nid;
+ cfs_hlist_node_t nid_hash;
+ cfs_list_t nid_list;
+ struct obd_device *nid_obd;
+ struct proc_dir_entry *nid_proc;
+ struct lprocfs_stats *nid_stats;
+ struct lprocfs_stats *nid_ldlm_stats;
+ struct brw_stats *nid_brw_stats;
+ cfs_atomic_t nid_exp_ref_count; /* for obd_nid_stats_hash
+ exp_nid_stats */
+}nid_stat_t;
+
+#define nidstat_getref(nidstat) \
+do { \
+ cfs_atomic_inc(&(nidstat)->nid_exp_ref_count); \
+} while(0)
+
+#define nidstat_putref(nidstat) \
+do { \
+ cfs_atomic_dec(&(nidstat)->nid_exp_ref_count); \
+ LASSERTF(cfs_atomic_read(&(nidstat)->nid_exp_ref_count) >= 0, \
+ "stat %p nid_exp_ref_count < 0\n", nidstat); \
+} while(0)
+
+enum obd_option {
+ OBD_OPT_FORCE = 0x0001,
+ OBD_OPT_FAILOVER = 0x0002,
+ OBD_OPT_ABORT_RECOV = 0x0004,
+};
+
+/**
+ * Export structure. Represents target-side of connection in portals.
+ * Also used in Lustre to connect between layers on the same node when
+ * there is no network-connection in-between.
+ * For every connected client there is an export structure on the server
+ * attached to the same obd device.
+ */