X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fgenops.c;h=436aa4d587e5fb99ac9f923f01791c9222a5e17a;hp=c6d7e5bf43fb3ebd7368f3b8122f7685984963de;hb=0607e01af74a81d0fe12ceec79bd22810a5dfe92;hpb=57373a2946f119c3d85dcb9fea13fcc3d3369b72 diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index c6d7e5b..436aa4d 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -125,6 +125,9 @@ struct obd_type *class_get_type(const char *name) if (strcmp(modname, "obdfilter") == 0) modname = "ofd"; + if (strcmp(modname, LUSTRE_LWP_NAME) == 0) + modname = LUSTRE_OSP_NAME; + if (!strncmp(modname, LUSTRE_MDS_NAME, strlen(LUSTRE_MDS_NAME))) modname = LUSTRE_MDT_NAME; @@ -312,8 +315,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name) for (i = 0; i < class_devno_max(); i++) { struct obd_device *obd = class_num2obd(i); - if (obd && obd->obd_name && - (strcmp(name, obd->obd_name) == 0)) { + if (obd && (strcmp(name, obd->obd_name) == 0)) { CERROR("Device %s already exists at %d, won't add\n", name, i); if (result) { @@ -394,7 +396,7 @@ int class_name2dev(const char *name) for (i = 0; i < class_devno_max(); i++) { struct obd_device *obd = class_num2obd(i); - if (obd && obd->obd_name && strcmp(name, obd->obd_name) == 0) { + if (obd && strcmp(name, obd->obd_name) == 0) { /* Make sure we finished attaching before we give out any references */ LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); @@ -1034,6 +1036,7 @@ struct obd_import *class_new_import(struct obd_device *obd) if (imp == NULL) return NULL; + CFS_INIT_LIST_HEAD(&imp->imp_pinger_chain); CFS_INIT_LIST_HEAD(&imp->imp_zombie_chain); CFS_INIT_LIST_HEAD(&imp->imp_replay_list); CFS_INIT_LIST_HEAD(&imp->imp_sending_list); @@ -1167,7 +1170,7 @@ void class_export_recovery_cleanup(struct obd_export *exp) * obd_stale_clients counter, * lightweight exports are not counted */ if (exp->exp_failed && - (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) == 0) + (exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT) == 0) exp->exp_obd->obd_stale_clients++; } spin_unlock(&obd->obd_recovery_task_lock);