Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / mdt / mdt_internal.h
index 4ddbf7c..5457a05 100644 (file)
@@ -389,10 +389,10 @@ struct mdt_txn_info {
 extern struct lu_context_key mdt_txn_key;
 
 static inline void mdt_trans_add_cb(const struct thandle *th,
-                                    mdt_cb_t cb_func, void *cb_data) 
+                                    mdt_cb_t cb_func, void *cb_data)
 {
         struct mdt_txn_info *txi;
-        
+
         txi = lu_context_key_get(&th->th_ctx, &mdt_txn_key);
         LASSERT(txi->txi_cb_count < ARRAY_SIZE(txi->txi_cb));
 
@@ -452,6 +452,15 @@ static inline const struct lu_fid *mdt_object_fid(struct mdt_object *o)
         return lu_object_fid(&o->mot_obj.mo_lu);
 }
 
+static inline struct lu_site *mdt_lu_site(const struct mdt_device *mdt)
+{
+        return mdt->mdt_md_dev.md_lu_dev.ld_site;
+}
+
+static inline struct md_site *mdt_md_site(const struct mdt_device *mdt)
+{
+        return lu_site2md(mdt_lu_site(mdt));
+}
 
 static inline void mdt_export_evict(struct obd_export *exp)
 {
@@ -532,6 +541,10 @@ int mdt_client_add(const struct lu_env *env,
 int mdt_client_new(const struct lu_env *env,
                    struct mdt_device *mdt);
 
+int mdt_export_stats_init(struct obd_device *obd,
+                          struct obd_export *exp,
+                          void *client_nid);
+
 int mdt_pin(struct mdt_thread_info* info);
 
 int mdt_lock_new_child(struct mdt_thread_info *info,