+static int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp,
+ void *localdata)
+{
+ lnet_nid_t *client_nid = localdata;
+ int rc, newnid;
+ ENTRY;
+
+ rc = lprocfs_exp_setup(exp, client_nid, &newnid);
+ if (rc) {
+ /* Mask error for already created
+ * /proc entries */
+ if (rc == -EALREADY)
+ rc = 0;
+ RETURN(rc);
+ }
+
+ if (newnid) {
+ rc = lprocfs_nid_ldlm_stats_init(exp->exp_nid_stats);
+ if (rc)
+ GOTO(clean, rc);
+ }
+ RETURN(0);
+clean:
+ lprocfs_exp_cleanup(exp);
+ return rc;
+}
+
+/**
+ * Add client export data to the MGS. This data is currently NOT stored on
+ * disk in the last_rcvd file or anywhere else. In the event of a MGS
+ * crash all connections are treated as new connections.
+ */
+int mgs_client_add(struct obd_device *obd, struct obd_export *exp,
+ void *localdata)
+{
+ return mgs_export_stats_init(obd, exp, localdata);
+}
+
+/* Remove client export data from the MGS */
+int mgs_client_free(struct obd_export *exp)
+{
+ return 0;
+}
+