+struct obd_export *lustre_find_lwp_by_index(const char *dev, __u32 idx)
+{
+ struct lustre_mount_info *lmi;
+ struct lustre_sb_info *lsi;
+ struct obd_device *lwp;
+ struct obd_export *exp = NULL;
+ char fsname[16];
+ char lwp_name[24];
+ int rc;
+
+ lmi = server_get_mount(dev);
+ if (lmi == NULL)
+ return NULL;
+
+ lsi = s2lsi(lmi->lmi_sb);
+ rc = server_name2fsname(lsi->lsi_svname, fsname, NULL);
+ if (rc != 0) {
+ CERROR("%s: failed to get fsname: rc = %d\n",
+ lsi->lsi_svname, rc);
+ goto err_lmi;
+ }
+
+ snprintf(lwp_name, sizeof(lwp_name), "%s-MDT%04x", fsname, idx);
+ spin_lock(&lsi->lsi_lwp_lock);
+ list_for_each_entry(lwp, &lsi->lsi_lwp_list, obd_lwp_list) {
+ char *ptr = strstr(lwp->obd_name, lwp_name);
+
+ if (ptr != NULL && lwp->obd_lwp_export != NULL) {
+ exp = class_export_get(lwp->obd_lwp_export);
+ break;
+ }
+ }
+ spin_unlock(&lsi->lsi_lwp_lock);
+
+err_lmi:
+ server_put_mount(dev, false);
+
+ return exp;
+}
+EXPORT_SYMBOL(lustre_find_lwp_by_index);
+
+void lustre_notify_lwp_list(struct obd_export *exp)