+ rc = lprocfs_obd_seq_create(obd, "rpc_stats", 0644,
+ &osc_rpc_stats_fops, obd);
+
+ return rc;
+}
+#endif /* CONFIG_PROC_FS */
+
+LUSTRE_OBD_UINT_PARAM_ATTR(at_min);
+LUSTRE_OBD_UINT_PARAM_ATTR(at_max);
+LUSTRE_OBD_UINT_PARAM_ATTR(at_history);
+LUSTRE_OBD_UINT_PARAM_ATTR(ldlm_enqueue_min);
+
+static struct attribute *osc_attrs[] = {
+ &lustre_attr_active.attr,
+ &lustre_attr_enable_page_cache_shrink.attr,
+ &lustre_attr_checksums.attr,
+ &lustre_attr_checksum_dump.attr,
+ &lustre_attr_cur_dirty_bytes.attr,
+ &lustre_attr_cur_lost_grant_bytes.attr,
+ &lustre_attr_cur_dirty_grant_bytes.attr,
+ &lustre_attr_destroys_in_flight.attr,
+ &lustre_attr_grant_shrink_interval.attr,
+ &lustre_attr_max_dirty_mb.attr,
+ &lustre_attr_max_rpcs_in_flight.attr,
+ &lustre_attr_short_io_bytes.attr,
+ &lustre_attr_resend_count.attr,
+ &lustre_attr_ost_conn_uuid.attr,
+ &lustre_attr_conn_uuid.attr,
+ &lustre_attr_ping.attr,
+ &lustre_attr_idle_timeout.attr,
+ &lustre_attr_idle_connect.attr,
+ &lustre_attr_grant_shrink.attr,
+ &lustre_attr_at_max.attr,
+ &lustre_attr_at_min.attr,
+ &lustre_attr_at_history.attr,
+ &lustre_attr_ldlm_enqueue_min.attr,
+ NULL,
+};
+
+KOBJ_ATTRIBUTE_GROUPS(osc); /* creates osc_groups */
+
+int osc_tunables_init(struct obd_device *obd)
+{
+ int rc;
+
+ obd->obd_vars = lprocfs_osc_obd_vars;
+ obd->obd_ktype.default_groups = KOBJ_ATTR_GROUPS(osc);
+ rc = lprocfs_obd_setup(obd, false);
+ if (rc)
+ return rc;
+#ifdef CONFIG_PROC_FS
+ /* If the basic OSC proc tree construction succeeded then
+ * lets do the rest.
+ */
+ rc = lprocfs_osc_attach_seqstat(obd);
+ if (rc)
+ goto obd_cleanup;