+ /* set up and start rebalance thread */
+ INIT_LIST_HEAD(&qmt->qmt_reba_list);
+ spin_lock_init(&qmt->qmt_reba_lock);
+ if (!qmt->qmt_child->dd_rdonly) {
+ rc = qmt_start_reba_thread(qmt);
+ if (rc) {
+ CERROR("%s: failed to start rebalance thread (%d)\n",
+ qmt->qmt_svname, rc);
+ GOTO(out, rc);
+ }
+ }
+
+ /* at the moment there is no linkage between lu_type and obd_type, so
+ * we lookup obd_type this way */
+ type = class_search_type(LUSTRE_QMT_NAME);
+ LASSERT(type != NULL);
+
+ /* put reference taken by class_search_type */
+ kobject_put(&type->typ_kobj);
+
+ /* register proc directory associated with this qmt */
+ qmt->qmt_proc = lprocfs_register(qmt->qmt_svname, type->typ_procroot,
+ NULL, NULL);
+ if (IS_ERR(qmt->qmt_proc)) {
+ rc = PTR_ERR(qmt->qmt_proc);
+ CERROR("%s: failed to create qmt proc entry (%d)\n",
+ qmt->qmt_svname, rc);
+ GOTO(out, rc);
+ }
+
+ /* initialize pool configuration */
+ rc = qmt_pool_init(env, qmt);
+ if (rc)
+ GOTO(out, rc);
+