Whamcloud - gitweb
LU-10391 obdclass: change class_match_nid to take lnet_nid
[fs/lustre-release.git] / lustre / target / tgt_mount.c
index 442e289..9e99b94 100644 (file)
@@ -640,11 +640,12 @@ static int lustre_lwp_setup(struct lustre_cfg *lcfg, struct lustre_sb_info *lsi,
        struct obd_device *obd;
        char *lwpname = NULL;
        char *lwpuuid = NULL;
+       struct lnet_nid nid;
        int rc;
 
        ENTRY;
-       rc = class_add_uuid(lustre_cfg_string(lcfg, 1),
-                           lcfg->lcfg_nid);
+       lnet_nid4_to_nid(lcfg->lcfg_nid, &nid);
+       rc = class_add_uuid(lustre_cfg_string(lcfg, 1), &nid);
        if (rc != 0) {
                CERROR("%s: Can't add uuid: rc =%d\n", lsi->lsi_svname, rc);
                RETURN(rc);
@@ -869,8 +870,10 @@ static int client_lwp_config_process(const struct lu_env *env,
                         */
                        cfg->cfg_flags |= CFG_F_SKIP;
                } else if (cfg->cfg_flags == (CFG_F_MARKER | CFG_F_SKIP)) {
-                       rc = class_add_uuid(lustre_cfg_string(lcfg, 1),
-                                           lcfg->lcfg_nid);
+                       struct lnet_nid nid;
+
+                       lnet_nid4_to_nid(lcfg->lcfg_nid, &nid);
+                       rc = class_add_uuid(lustre_cfg_string(lcfg, 1), &nid);
                        if (rc < 0)
                                CERROR("%s: Fail to add uuid, rc:%d\n",
                                       lsi->lsi_svname, rc);
@@ -1175,8 +1178,7 @@ static int server_lsi2mti(struct lustre_sb_info *lsi,
                 */
                if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_NO_PRIMNODE) != 0 &&
                    class_match_nid(lsi->lsi_lmd->lmd_params,
-                                   PARAM_FAILNODE,
-                                   lnet_nid_to_nid4(&id.nid)) < 1)
+                                   PARAM_FAILNODE, &id.nid) < 1)
                        continue;
 
                if (!class_find_param(lsi->lsi_lmd->lmd_params,