X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmgs%2Fmgs_handler.c;h=6487d720752d15580428b65678fec98ab72fb904;hp=a670b079d20f75d67312cc4b4838aa2eab75fbf6;hb=38e6ee6fb779c34c7ef3eb4a010332385b3b84c1;hpb=fb291dbf72ecd32847f1499776a441126f28e9bf diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index a670b07..6487d72 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -328,25 +328,23 @@ static int mgs_check_target(const struct lu_env *env, /* Ensure this is not a failover node that is connecting first*/ static int mgs_check_failover_reg(struct mgs_target_info *mti) { - lnet_nid_t nid; - char *ptr; - int i; + lnet_nid_t nid; + char *ptr; + int i; - ptr = mti->mti_params; - while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) { + ptr = mti->mti_params; + while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) { while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) { - for (i = 0; i < mti->mti_nid_count; i++) { - if (nid == mti->mti_nids[i]) { - LCONSOLE_WARN("Denying initial registra" - "tion attempt from nid %s" - ", specified as failover" - "\n",libcfs_nid2str(nid)); - return -EADDRNOTAVAIL; - } - } - } - } - return 0; + for (i = 0; i < mti->mti_nid_count; i++) { + if (nid == mti->mti_nids[i]) { + LCONSOLE_WARN("Denying initial registration attempt from nid %s, specified as failover\n", + libcfs_nid2str(nid)); + return -EADDRNOTAVAIL; + } + } + } + } + return 0; } /* Called whenever a target starts up. Flags indicate first connect, etc. */