staging: lustre: obd: MDT mount fails on MDS w/o MGS on it
If we specify multiple --mgsnode for a MDT, when we start MDS upon it while MGS is no the other node, the MGC import connection will always select the local nid (which is one of the candidate mgsnode) since it think its the closest connection. This patch treats further --mgsnode nids as failover nids, so that multiple import connections are added for the MGC import. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3829 Reviewed-on: http://review.whamcloud.com/7509 Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
32cc01c42f
commit
489d82fcd8
@ -307,7 +307,8 @@ int lustre_start_mgc(struct super_block *sb)
|
||||
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
|
||||
rc = do_lcfg(mgcname, nid,
|
||||
LCFG_ADD_UUID, niduuid, NULL, NULL, NULL);
|
||||
i++;
|
||||
if (!rc)
|
||||
i++;
|
||||
/* Stop at the first failover nid */
|
||||
if (*ptr == ':')
|
||||
break;
|
||||
@ -345,16 +346,18 @@ int lustre_start_mgc(struct super_block *sb)
|
||||
sprintf(niduuid, "%s_%x", mgcname, i);
|
||||
j = 0;
|
||||
while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
|
||||
j++;
|
||||
rc = do_lcfg(mgcname, nid,
|
||||
LCFG_ADD_UUID, niduuid, NULL, NULL, NULL);
|
||||
rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID, niduuid,
|
||||
NULL, NULL, NULL);
|
||||
if (!rc)
|
||||
++j;
|
||||
if (*ptr == ':')
|
||||
break;
|
||||
}
|
||||
if (j > 0) {
|
||||
rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
|
||||
niduuid, NULL, NULL, NULL);
|
||||
i++;
|
||||
if (!rc)
|
||||
i++;
|
||||
} else {
|
||||
/* at ":/fsname" */
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user