/********************** class fns **********************/
-/* Create a new device and set the type, name and uuid. If
- * successful, the new device can be accessed by either name or uuid.
+/**
+ * Create a new device and set the type, name and uuid. If successful, the new
+ * device can be accessed by either name or uuid.
*/
int class_attach(struct lustre_cfg *lcfg)
{
LASSERTF(strncmp(obd->obd_name, name, strlen(name)) == 0, "%p obd_name %s != %s\n",
obd, obd->obd_name, name);
+ rwlock_init(&obd->obd_pool_lock);
+ obd->obd_pool_limit = 0;
+ obd->obd_pool_slv = 0;
+
CFS_INIT_LIST_HEAD(&obd->obd_exports);
CFS_INIT_LIST_HEAD(&obd->obd_exports_timed);
CFS_INIT_LIST_HEAD(&obd->obd_nid_stats);
len = strlen(uuid);
if (len >= sizeof(obd->obd_uuid)) {
- CERROR("uuid must be < "LPSZ" bytes long\n",
- sizeof(obd->obd_uuid));
+ CERROR("uuid must be < %d bytes long\n",
+ (int)sizeof(obd->obd_uuid));
GOTO(out, rc = -EINVAL);
}
memcpy(obd->obd_uuid.uuid, uuid, len);
obd->obd_name, obd->obd_uuid.uuid);
class_decref(obd);
-
+
/* not strictly necessary, but cleans up eagerly */
obd_zombie_impexp_cull();
-
+
RETURN(0);
}