+#endif /* CONFIG_PROC_FS */
+
+static struct attribute *lmv_attrs[] = {
+ &lustre_attr_activeobd.attr,
+ &lustre_attr_desc_uuid.attr,
+ &lustre_attr_numobd.attr,
+ &lustre_attr_qos_maxage.attr,
+ &lustre_attr_qos_prio_free.attr,
+ &lustre_attr_qos_threshold_rr.attr,
+ NULL,
+};
+
+int lmv_tunables_init(struct obd_device *obd)
+{
+ int rc;
+
+ obd->obd_ktype.default_attrs = lmv_attrs;
+ rc = lprocfs_obd_setup(obd, true);
+ if (rc)
+ goto out_failed;
+#ifdef CONFIG_PROC_FS
+ rc = lprocfs_alloc_md_stats(obd, 0);
+ if (rc) {
+ lprocfs_obd_cleanup(obd);
+ goto out_failed;
+ }
+
+ rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
+ 0444, &lmv_proc_target_fops, obd);
+ if (rc) {
+ lprocfs_free_md_stats(obd);
+ lprocfs_obd_cleanup(obd);
+ CWARN("%s: error adding LMV target_obd file: rc = %d\n",
+ obd->obd_name, rc);
+ rc = 0;
+ }
+#endif /* CONFIG_PROC_FS */
+out_failed:
+ return rc;
+}